Created
February 14, 2017 21:34
-
-
Save JiDai/a2219c0b4bd6aa5b23d242f4c8d38c1e 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 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