-
Notifications
You must be signed in to change notification settings - Fork 1
/
fuse.js
37 lines (32 loc) · 800 Bytes
/
fuse.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
const { FuseBox, WebIndexPlugin } = require('fuse-box');
const fuse = FuseBox.init({
homeDir: 'src/',
output: 'dist/$name.js',
sourceMaps: { inline: false, vendor: false }, //Not needed as we are debugging with vscode
plugins: [
WebIndexPlugin({
bundles: [ 'public/client' ],
title: 'fuse-debug'
})
]
});
fuse.dev({ httpServer: false });
fuse
.bundle('public/client')
.instructions('>client/index.tsx')
//When in dev push the version as high as possible
.target('browser@es2017')
.watch('src/client/**')
.hmr();
fuse
.bundle('server')
.instructions('>[server/index.ts]')
.target('server@es2017')
.watch('src/server/**')
.hmr()
.completed((proc) => {
proc.require({
close: ({ FuseBox }) => FuseBox.import(FuseBox.mainFile).shutdown()
});
});
fuse.run();