-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
48 lines (44 loc) · 789 Bytes
/
build.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
46
47
48
const {
FuseBox,
BabelPlugin,
} = require('fuse-box');
const fuse = FuseBox.init({
homeDir: 'src',
output: 'dist/$name.js',
sourceMaps: true,
plugins: [
BabelPlugin({
config: {
sourceMaps: true,
presets: [
[
'env',
{
targets: {
browsers: [
'last 3 versions',
'not < 0.25%',
'not Android < 5',
],
},
useBuiltIns: true,
},
],
[
'stage-0',
],
],
},
}),
],
});
fuse
.bundle('bundle')
.instructions('>main.js')
.hmr({ reload: true })
.watch();
fuse.dev({
root: 'dist/',
httpServer: true,
});
fuse.run();