How to use the fuse-box.FuseBox function in fuse-box

To help you get started, we’ve selected a few fuse-box examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fuse-box / react-example / gulpfile.js View on Github external
const fsbx = require("fuse-box");
const gulp = require("gulp");
const runSequence = require('run-sequence');
const server = require('gulp-server-livereload');


// Create FuseBox Instance
let fuseBox = new fsbx.FuseBox({
    homeDir: "src/",
    sourceMap: {
        bundleReference: "sourcemaps.js.map",
        outFile: "./build/sourcemaps.js.map",
    },
    outFile: "./build/out.js",

    plugins: [
        fsbx.SVGPlugin(),
        fsbx.CSSPlugin(),
        fsbx.BabelPlugin({
            config: {
                sourceMaps: true,
                presets: ["latest"],
                plugins: [
                    ["transform-react-jsx"]
github OffGridNetworks / fuse-box-create-react-app / packages / fuse-box-react-scripts / config / fuse.config.js View on Github external
Sparky.task('config', () => {
    fuse = new FuseBox({
      homeDir: srcDir,
      sourceMaps: isProduction ? false : { project: true, vendor: false },
      hash: isProduction && !component && !componentdocs,
      cache: !isProduction,
      output: path.join(
        targetDir,
        componentdocs ? paths.Bundle : '',
        '$name.js'
      ),
      target: isProduction ? 'browser@es5' : 'browser@es2015',
      plugins: [
        EnvPlugin(env),
        SVGPlugin(),
        /* [LESSPlugin(), CSSPlugin()],  Add LESS, SASS, etc here if needed */
        CSSPlugin(),
        JSONPlugin(),
github OffGridNetworks / fuse-box-create-react-app / packages / fuse-box-react-scripts-ts / config / fuse.config.js View on Github external
Sparky.task('config', () => {
    fuse = new FuseBox({
      homeDir: srcDir,
      sourceMaps: isProduction ? false : { project: true, vendor: false },
      hash: isProduction && !component && !componentdocs,
      cache: !isProduction,
      output: path.join(
        targetDir,
        componentdocs ? paths.Bundle : '',
        '$name.js'
      ),
      target: isProduction ? 'browser@es5' : 'browser@es2015',
      plugins: [
        EnvPlugin(env),
        SVGPlugin(),
        /* [LESSPlugin(), CSSPlugin()],  Add LESS, SASS, etc here if needed */
        CSSPlugin(),
        JSONPlugin(),
github otothea / docker-ui / fuse.js View on Github external
module.exports = production => {
  const output = production ? 'dist' : 'build'

  const fuse = new FuseBox({
    homeDir:    'client',
    sourceMaps: !production,
    hash:       production,
    output:     `${output}/$name.js`,
    plugins: [
      ['.json', JSONPlugin()],
      ['.scss', SassPlugin(), CSSPlugin({outFile: `${output}/app.css`, group: 'app.css'})],
      ['.js', ESLintPlugin(), BabelPlugin()],
      WebIndexPlugin({
        title:    'Docker UI',
        template: 'client/index.html'
      }),
    ],
    alias: {
      stores: '~/stores',
      lib:    '~/lib',
github deamme / laco / examples / react / fuse.js View on Github external
Sparky.task('config', _ => {
  fuse = new FuseBox({
    homeDir: 'src',
    hash: isProduction,
    output: 'dist/$name.js',
    cache: !isProduction,
    sourceMaps: !isProduction,
    target: 'browser',
    plugins: [
      EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }),
      WebIndexPlugin({
        title: 'React Typescript FuseBox Example',
        template: 'src/index.html',
      }),
      isProduction &&
        QuantumPlugin({
          bakeApiIntoBundle: 'app',
          treeshake: true,
github fliphub / fliphub / packages / playground / original / middleware / builders / plugins / WebWorkerPlugin.js View on Github external
}
}

var worker = new WebWorkerPlugin()
worker.test = /(.*)/

var params = {
  debug: true,
  cache: false,
  homeDir: resolve('./'),
  outFile: resolve('./src/webworker/dist/ww.js'),
  plugins: [
    worker,
  ],
}
var fuse = new fsbx.FuseBox(params)
fuse.bundle('>/src/webworker/index.js src/**/webworker/*.js')
github deamme / laco / examples / inferno / fuse.js View on Github external
Sparky.task('config', _ => {
  fuse = new FuseBox({
    homeDir: 'src',
    hash: isProduction,
    output: 'dist/$name.js',
    cache: !isProduction,
    sourceMaps: !isProduction,
    target: 'browser',
    transformers: {
      before: [transformInferno()],
    },
    plugins: [
      EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }),
      WebIndexPlugin({
        title: 'Inferno Typescript FuseBox Example',
        template: 'src/index.html',
      }),
      isProduction &&