-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (34 loc) · 1.26 KB
/
webpack.config.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
"use strict";
const UglifyJSPlugin = require("uglifyjs-webpack-plugin");
const common = {
devtool: "source-map",
module: {
loaders: [{
test: /\.js$/,
loader: "babel-loader",
options: {
minified: true,
presets: [[
"env",
{
targets: { browsers: ["last 1 Chrome version"] }
}
]],
sourceMap: true
}
}]
},
plugins: [
new UglifyJSPlugin({ sourceMap: true, uglifyOptions: { output: { comments: false } } })
]
};
module.exports = [
Object.assign({ entry: "./module/mdc-drawer.js", output: { filename: "js/mdc-drawer.js" } }, common),
Object.assign({ entry: "./module/mdc-menu.js", output: { filename: "js/mdc-menu.js" } }, common),
Object.assign({ entry: "./module/mdc-ripple.js", output: { filename: "js/mdc-ripple.js" } }, common),
Object.assign({ entry: "./module/mdc-snackbar.js", output: { filename: "js/mdc-snackbar.js" } }, common),
Object.assign({ entry: "./module/mdc-top-app-bar.js", output: { filename: "js/mdc-top-app-bar.js" } }, common),
Object.assign({ entry: "./module/common.js", output: { filename: "js/common.js" } }, common),
Object.assign({ entry: "./module/index.js", output: { filename: "js/index.js" } }, common),
Object.assign({ entry: "./module/output.js", output: { filename: "js/output.js" } }, common)
];