Created
November 24, 2017 08:39
-
-
Save ccapndave/e2a0f548c97fb83cbc964bd69db026d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { FuseBox, WebIndexPlugin, LESSPlugin, CSSPlugin } = require("fuse-box"); | |
const path = require("path"); | |
const fuse = FuseBox.init({ | |
homeDir: "app", | |
output: "dist/$name.js", | |
plugins: [ | |
WebIndexPlugin(), | |
[ | |
LESSPlugin({ paths: [ path.resolve(__dirname, "node_modules") ] }), | |
CSSPlugin() | |
] | |
] | |
}); | |
fuse.dev({ port: 5000, httpServer: false }); | |
// Bundle the application | |
fuse.bundle("app") | |
.target("browser") | |
.instructions("> js/app.ts") | |
.watch("js/**") | |
.watch("style/**"); | |
// Run the development server | |
fuse.bundle("server") | |
.target("node") | |
.instructions("> [server.js]") | |
.watch("server.js") | |
.completed(proc => { | |
proc.kill(); | |
proc.start(); | |
}); | |
fuse.run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment