Created
December 8, 2017 12:33
-
-
Save kasper573/a92782445f93da8307685abc1e22cdba to your computer and use it in GitHub Desktop.
This file contains 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 fuse = FuseBox.init({ | |
homeDir: "app", | |
sourceMaps: {project: options.sourceMaps, vendor: false}, | |
hash: options.hashFilenames, | |
modulesFolder: "app", | |
alias: { | |
src: "~/src/", | |
config: "~/config/" | |
}, | |
target: "browser@es2017", | |
output: `${options.outputFolder}/$name.js`, | |
warnings: true, | |
cache: options.hmr, // fuse-box requires cache to be on to support hmr | |
log: options.log, | |
debug: options.debug, | |
tsConfig: "tsconfig.json", | |
useTypescriptCompiler: true, | |
plugins: [ | |
EnvPlugin({ | |
NODE_ENV: nodeEnv | |
}), | |
WebIndexPlugin({path: "."}), | |
FlowPlugin({limit2project: true}), | |
CopyPlugin({files: ["*.png", "*.jpg", "*.ogg"], dest: "assets", useDefault: false}), | |
CSSPlugin(), | |
JSONPlugin(), | |
options.minify ? | |
QuantumPlugin({ | |
treeshake: true, | |
uglify: true | |
}) : undefined | |
] | |
}); | |
const app = fuse.bundle("app") | |
.instructions(`!> [src/test.js]`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment