-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuse.prod.js
45 lines (39 loc) · 938 Bytes
/
fuse.prod.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
40
41
42
43
44
45
const fs = require("fs-extra");
fs.removeSync("dist");
const {
EnvPlugin,
FuseBox,
QuantumPlugin,
WebIndexPlugin,
} = require("fuse-box");
const fuse = FuseBox.init({
homeDir: "src",
sourceMaps: false,
target: "browser",
plugins: [
EnvPlugin({
NODE_ENV: "production"
}),
// See http://fuse-box.org/page/quantum ...
QuantumPlugin({
target: "browser",
bakeApiIntoBundle: "vendor",
removeExportsInterop: true,
treeshake: true,
uglify: {
warnings: true
}
}),
WebIndexPlugin({
template: "src/index.html",
target: "index.html"
}),
],
hash:true,
output: "dist/$name.$hash.js",
});
fuse.bundle("vendor")
.instructions("~/index.tsx");
fuse.bundle("app")
.instructions("!> index.tsx [index.tsx]");
fuse.run();