Skip to content

Instantly share code, notes, and snippets.

@JiDai
Created February 14, 2017 21:34
Show Gist options
  • Save JiDai/a2219c0b4bd6aa5b23d242f4c8d38c1e to your computer and use it in GitHub Desktop.
Save JiDai/a2219c0b4bd6aa5b23d242f4c8d38c1e to your computer and use it in GitHub Desktop.
const fsbx = require("fuse-box");
const dotenv = require('dotenv')
const env = dotenv.config().parsed // will return an object
// Create FuseBox Instance
const fuseBox = new fsbx.FuseBox({
homeDir: "mypro/static/app_react/",
sourceMap: {
bundleReference: "sourcemaps.js.map",
outFile: "./build/sourcemaps.js.map",
},
outFile: "./build/bundle.js",
modulesFolder: "node_modules",
plugins: [
[
fsbx.SassPlugin(),
fsbx.CSSPlugin()
],
fsbx.SVGPlugin(),
fsbx.EnvPlugin(env),
fsbx.BabelPlugin({
config: {
sourceMaps: true,
presets: ["es2015", "react", "stage-0"],
plugins: [
"react-hot-loader/babel",
"transform-class-properties"
]
}
})
]
});
fuseBox.devServer("> index.js");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment