Skip to content

Instantly share code, notes, and snippets.

@kzorluoglu
Created May 17, 2021 15:10
Show Gist options
  • Save kzorluoglu/c0cde377136744a27d4cfa40806625ba to your computer and use it in GitHub Desktop.
Save kzorluoglu/c0cde377136744a27d4cfa40806625ba to your computer and use it in GitHub Desktop.
webpack.config.js for Chameleon 7.1.x with Vue.js
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