-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathwebpack.base.conf.js
39 lines (38 loc) · 1.23 KB
/
webpack.base.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// const CopyWebpackPlugin = require('copy-webpack-plugin');
const webpack = require('webpack');
const path = require('path');
const root = pathRelativeToRoot => path.resolve(__dirname, '..', pathRelativeToRoot);
module.exports = {
entry: {
master: __dirname + '/src/master/index.js',
slaves: __dirname + '/src/slave/index.js'
},
output: {
path: __dirname + '/dist/box/',
filename: '[name]/index.js',
libraryTarget: "umd"
},
devtool: 'source-map',
plugins: [
new webpack.LoaderOptionsPlugin({
minimize: false,
debug: true
}),
// new webpack.optimize.UglifyJsPlugin({
// // sourceMap: true,
// compress: {
// warnings: false,
// /* eslint-disable fecs-camelcase */
// drop_console: false
// /* eslint-disable fecs-camelcase */
// },
// // sourceMap: true,
// comments: false
// }),
// new CopyWebpackPlugin([{
// from: __dirname + '/src/templates/**/*',
// to: __dirname + '/dist/box/[1]/[name].[ext]',
// test: /([^/]+)\/([^/]+)\.[^.]+$/
// }])
]
};