forked from ysmood/yaku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (34 loc) · 968 Bytes
/
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
35
36
37
38
var webpack = require("webpack");
var kit = require('nokit');
var isProduction = process.env.NODE_ENV === "production";
var self = module.exports = {
entry: {
"test-browser": "./test/test-browser.js",
"yaku.browser.global": "./src/global",
"coreJsPromise": "./test/coreJsPromise",
"my-promise": "my-promise"
},
output: {
filename: "[name].js",
path: kit.path.join(process.cwd(), "dist"),
pathinfo: true
},
module: {
rules: [
{
test: /getPromise\.js$/,
use: [{
loader: "./test/getPromiseBrowser"
}]
}
]
}
};
if (isProduction) {
self.output.filename = "[name].min.js";
self.plugins = [new webpack.optimize.UglifyJsPlugin({
compress: { screw_ie8: false },
mangle: { screw_ie8: false },
output: { screw_ie8: false, beautify: false }
})];
}