diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-10 18:40:59 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-11 15:31:29 +0200 |
commit | 75f0d3c093de01365f85e8e3035291d9a9a8c889 (patch) | |
tree | b84b25a2e6eb16c00a74fd6db8b0f446ef661a03 /webpack.common.js | |
parent | 3f3ad0eeb8e01fe725a89ad196d23f22ad33de41 (diff) |
Vue cleanup and init
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js new file mode 100644 index 00000000..4a07bea9 --- /dev/null +++ b/webpack.common.js @@ -0,0 +1,52 @@ +const path = require('path') +const { VueLoaderPlugin } = require('vue-loader') +const StyleLintPlugin = require('stylelint-webpack-plugin') + +module.exports = { + entry: path.join(__dirname, 'src', 'main.js'), + output: { + path: path.resolve(__dirname, './js'), + publicPath: '/js/', + filename: 'contacts.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()], + resolve: { + alias: { + vue$: 'vue/dist/vue.esm.js' + }, + extensions: ['*', '.js', '.vue', '.json'] + } +} |