diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2018-09-28 19:26:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 19:26:05 +0200 |
commit | d520d96fee5e791cf7cea9cd5ffcbbbe4ce8d2ea (patch) | |
tree | cb79e4bfd4e00b395b3c3b0cc88fe841925d1d90 /webpack.common.js | |
parent | 754ea8e03f70999a08d9ea172b423aeeb6dcc413 (diff) | |
parent | fc816f42b0c6934c00627e97f0786e8324e9218f (diff) |
Merge pull request #596 from nextcloud/vuev3.0.0-alpha1
Contacts 3.0.0
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js new file mode 100644 index 00000000..71f1ee07 --- /dev/null +++ b/webpack.common.js @@ -0,0 +1,58 @@ +const path = require('path') +const webpack = require('webpack') +const { VueLoaderPlugin } = require('vue-loader') +const StyleLintPlugin = require('stylelint-webpack-plugin') + +module.exports = { + entry: ['babel-polyfill', path.join(__dirname, 'src', 'main.js')], + output: { + path: path.resolve(__dirname, './js'), + publicPath: '/js/', + filename: 'contacts.js', + chunkFilename: 'chunks/[name].js' + }, + module: { + rules: [ + { + test: /\.css$/, + use: ['vue-style-loader', 'css-loader'] + }, + { + test: /\.scss$/, + use: ['vue-style-loader', 'css-loader', 'sass-loader'] + }, + { + test: /\.(js|vue)$/, + use: 'eslint-loader', + enforce: 'pre' + }, + { + test: /\.vue$/, + loader: 'vue-loader' + }, + { + test: /\.js$/, + loader: 'babel-loader', + exclude: /node_modules/ + }, + { + test: /\.(png|jpg|gif|svg)$/, + loader: 'file-loader', + options: { + name: '[name].[ext]?[hash]' + } + } + ] + }, + plugins: [ + new VueLoaderPlugin(), + new StyleLintPlugin(), + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/) + ], + resolve: { + alias: { + vue$: 'vue/dist/vue.esm.js' + }, + extensions: ['*', '.js', '.vue', '.json'] + } +} |