|
|
@ -1,55 +0,0 @@ |
|
|
|
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)
|
|
|
|
] |
|
|
|
}; |