How to use the webpack-stream function in webpack-stream

To help you get started, we’ve selected a few webpack-stream 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 HaNdTriX / generator-chrome-extension-kickstart / app / templates / tasks / scripts.js View on Github external
gulp.task('scripts', (cb) => {
  return gulp.src('app/scripts/*.js')
    .pipe(plumber({
      // Webpack will log the errors
      errorHandler () {}
    }))
    .pipe(named())
    .pipe(gulpWebpack({
      devtool: args.sourcemaps ? 'inline-source-map' : false,
      watch: args.watch,
      plugins: [
        new webpack.DefinePlugin({
          'process.env.NODE_ENV': JSON.stringify(ENV),
          'process.env.VENDOR': JSON.stringify(args.vendor)
        })
      ].concat(args.production ? [
        new BabiliPlugin()
      ] : []),
      module: {
        rules: [{
          test: /\.js$/,
          loader: 'babel-loader'
        }]
      }
github io-monad / textlint-chrome-extension / tasks / scripts.js View on Github external
export function buildForTest() {
  if (args.watch) {
    return gulp.src(["tests/entry.js"])
      .pipe(gulpWebpack(getWebpackConfig(true)))
      .pipe(sourcemaps.init({ loadMaps: true }))
      .pipe(espower())
      .pipe(sourcemaps.write())
      .pipe(gulp.dest("tmp/scripts"));
  } else {
    return gulp.src(["tests/entry.js"])
      .pipe(gulpWebpack(getWebpackConfig(true)))
      .pipe(gulp.dest("tmp/scripts"));
  }
}
github Whatever-Inc / KAMRA-Deja-Vu / main / gulpfile.babel.js View on Github external
output: {
        filename: '[id].worker.js'
      }
    }
  }
  if (developmentMode) {
    config.devtool = 'inline-source-map'
  } else {
    config.plugins.push(
      new webpack.optimize.UglifyJsPlugin(),
      new webpack.optimize.DedupePlugin(),
      new webpack.NoErrorsPlugin()
    )
  }
  return gulp.src('')
    .pipe(webpackStream(config, null, (err, stats) => {
      if (!err) {
        $.util.log(stats.toString({
          colors: $.util.colors.supportsColor,
          chunks: !developmentMode,
          chunkModules: !developmentMode
        }))
        browserSync.reload()
      }
    }))
    .pipe(gulp.dest('./public'))
})
github minhtranite / react-progress-bar-plus / gulpfile.babel.js View on Github external
gulp.task('build:example:webpack', () => gulp
  .src(['example/app/app.js'])
  .pipe(webpackStream(exampleWebpackConfig, webpack))
  .pipe(gulp.dest('example/dist')));
github minhtranite / react-notifications / gulpfile.babel.js View on Github external
gulp.task('build:example:webpack', () => gulp
  .src(['example/app/app.js'])
  .pipe(webpackStream(exampleWebpackConfig, webpack))
  .pipe(gulp.dest('example/dist')));
github elementary / houston / gulpfile.babel.js View on Github external
const functionWebpack = () => {
  return gulp.src('src/houston/public/scripts/app.js')
  .pipe(gulpWebpack(webpackConfig, webpack))
  .pipe(gulp.dest('build/houston/public/scripts'))
}
github minhtranite / react-validation-decorator / gulpfile.babel.js View on Github external
gulp.task('build:example:webpack', () => {
  return gulp
    .src(['example/app/app.js'])
    .pipe(webpackStream(exampleWebpackConfig, webpack))
    .pipe(gulp.dest('example/dist'));
});
github andreyalexeich / gulp-pug-starter / gulp-tasks / scripts.js View on Github external
gulp.task("scripts", () => {
    return gulp.src(paths.scripts.src)
        .pipe(webpackStream(webpackConfig), webpack)
        .pipe(gulpif(production, rename({
            suffix: ".min"
        })))
        .pipe(gulp.dest(paths.scripts.dist))
        .pipe(debug({
            "title": "JS files"
        }))
        .on("end", browsersync.reload);
});
github mismith0227 / wp-theme-modernize / gulpfile.babel.js View on Github external
gulp.task('webpack', () => {
  if (production) {
    webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin())
  } else {
    webpackConfig.devtool = 'source-map'
  }
  return gulp
    .src(config.tasks.webpack.src)
    .pipe(plumber())
    .pipe(webpackStream(webpackConfig, webpack))
    .pipe(gulp.dest(config.tasks.webpack.dest))
})

webpack-stream

Run webpack as a stream

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis