You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.5 KiB
55 lines
1.5 KiB
const path = require('path');
|
|
const HTMLWebpackPlugin = require('html-webpack-plugin')
|
|
// const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
|
|
const WebpackCdnPlugin = require('webpack-cdn-plugin');
|
|
let options = {};
|
|
options.verbose = true;
|
|
|
|
module.exports = {
|
|
optimization:{
|
|
minimize: false, // <---- disables uglify.
|
|
// minimizer: [new UglifyJsPlugin()] if you want to customize it.
|
|
},
|
|
mode: 'production',
|
|
entry: './chat.js',
|
|
output: {
|
|
path: path.resolve(__dirname, '../resources/static/js/'),
|
|
// ../resources/static/js/
|
|
filename: 'bundle.js'
|
|
},
|
|
module: {
|
|
rules: [{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader'
|
|
}
|
|
}]
|
|
},
|
|
plugins: [
|
|
|
|
|
|
new HTMLWebpackPlugin(),
|
|
new WebpackCdnPlugin({
|
|
modules: [
|
|
// {
|
|
// name: 'vue',
|
|
// var: 'Vue',
|
|
// path: 'dist/vue.runtime.min.js'
|
|
// },
|
|
// {
|
|
// name: 'vue-router',
|
|
// var: 'VueRouter',
|
|
// path: 'dist/vue-router.min.js'
|
|
// },
|
|
// {
|
|
// name: 'vuex',
|
|
// var: 'Vuex',
|
|
// path: 'dist/vuex.min.js'
|
|
// }
|
|
],
|
|
publicPath: '/node_modules'
|
|
})
|
|
// new DynamicCdnWebpackPlugin(options)
|
|
]
|
|
};
|