Created
May 17, 2021 15:10
-
-
Save kzorluoglu/c0cde377136744a27d4cfa40806625ba to your computer and use it in GitHub Desktop.
webpack.config.js for Chameleon 7.1.x with Vue.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const VueLoaderPlugin = require('vue-loader/lib/plugin'); | |
const webpack = require('webpack'); | |
const path = require('path'); | |
module.exports = { | |
entry: './assets/main.js', | |
watchOptions: { | |
ignored: '**/node_modules', | |
}, | |
module: { | |
rules: [ | |
{ test: /\.js$/, use: 'babel-loader' }, | |
{ test: /\.vue$/, use: 'vue-loader' }, | |
{ test: /\.css$/, use: ['vue-style-loader', 'css-loader']}, | |
{ | |
test: /\.s(c|a)ss$/, | |
use: [ | |
'vue-style-loader', | |
'css-loader', | |
{ | |
loader: 'sass-loader', | |
options: { | |
implementation: require('sass'), | |
} | |
} | |
] | |
} | |
] | |
}, | |
output: { | |
path: path.resolve(__dirname, 'web', 'build'), | |
filename: '[name].[contenthash].js', | |
clean: true | |
}, | |
resolve: { | |
extensions: [ '.tsx', '.ts', '.js', '.vue' ], | |
alias: { | |
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1 | |
} | |
}, | |
plugins: [ | |
new VueLoaderPlugin(), | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment