diff options
author | Marco Ambrosini <marcoambrosini@pm.me> | 2019-09-13 19:28:44 +0300 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@pm.me> | 2019-10-09 11:48:26 +0300 |
commit | 5e9c3400c758499d6d0b796ad288ede528835fa9 (patch) | |
tree | 1eac8577b0a486aa6b9ba0cb24caef83c9b769df /webpack.common.js | |
parent | 88d7d7820e5ae8f4a3d897605124ad7755926494 (diff) |
Create Message component
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js new file mode 100644 index 000000000..482dd81e3 --- /dev/null +++ b/webpack.common.js @@ -0,0 +1,50 @@ +const path = require('path') +const { VueLoaderPlugin } = require('vue-loader') +const StyleLintPlugin = require('stylelint-webpack-plugin') +const packageJson = require('./package.json') +const appName = packageJson.name + +module.exports = { + entry: path.join(__dirname, 'src', 'main.js'), + output: { + path: path.resolve(__dirname, './js'), + publicPath: '/js/', + filename: `${appName}.js`, + chunkFilename: 'chunks/[name]-[hash].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', + exclude: /node_modules/, + enforce: 'pre' + }, + { + test: /\.vue$/, + loader: 'vue-loader', + exclude: /node_modules/ + }, + { + test: /\.js$/, + loader: 'babel-loader', + exclude: /node_modules/ + } + ] + }, + plugins: [ + new VueLoaderPlugin(), + new StyleLintPlugin() + ], + resolve: { + extensions: ['*', '.js', '.vue'] + } +} |