Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. const { FuseBox, QuantumPlugin, WebIndexPlugin } = require("fuse-box");
  2.  
  3. const fuse = FuseBox.init({
  4. target: "browser@es6",
  5. homeDir: "src",
  6. output: "dist/$name.js",
  7. sourceMaps: true,
  8. plugins: [
  9. WebIndexPlugin({
  10. template: "src/index.html",
  11. path: "./",
  12. }),
  13. process.env.NODE_ENV === "production" &&
  14. QuantumPlugin({
  15. treeshake: true,
  16. uglify: true,
  17. bakeApiIntoBundle: "bundle",
  18. }),
  19. ],
  20. });
  21.  
  22. if (process.env.NODE_ENV !== "production") {
  23. fuse.dev();
  24. fuse
  25. .bundle("bundle")
  26. .instructions(">index.tsx")
  27. .hmr()
  28. .watch();
  29. } else {
  30. fuse.bundle("bundle").instructions(">index.tsx");
  31. }
  32. fuse.run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement