Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created November 24, 2017 08:39
Show Gist options
  • Save ccapndave/e2a0f548c97fb83cbc964bd69db026d5 to your computer and use it in GitHub Desktop.
Save ccapndave/e2a0f548c97fb83cbc964bd69db026d5 to your computer and use it in GitHub Desktop.
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