question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a `watch` option. E.g. webpack({watch: true})

See original GitHub issue

With this flag set to true, the plugin would run bundler in a watch mode - bundler.watch(..), instead of bundler.run(..).

var gulp = require('gulp');
var webpack = require('gulp-webpack');

gulp.task('bundle', function () {
  return gulp.src('src/app.jsx')
    .pipe(webpack({watch: true}))
    .pipe(gulp.dest('./build'));
});

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jmurzycommented, May 24, 2016

For those of you who are still having issues with Weback watch, I created a PR that should address this in a more gulp friendly way. See #109. Let me know how this works for you guys.

🍺

3reactions
ElsewhereGamescommented, Feb 12, 2016

@MarkLeMerise Are you return-ing the gulp pipeline? Instead of:

gulp.task(
  'deploy-typescript',
  function() {
    return gulp.src('app.js')
      .pipe(webpackStream(webpackConfiguration))
      .pipe(gulp.dest('bundle.js'));
  }
);

Try:

gulp.task(
  'deploy-typescript',
  function() {
    gulp.src('app.js')
      .pipe(webpackStream(webpackConfiguration))
      .pipe(gulp.dest('bundle.js'));
  }
);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Watch and WatchOptions | webpack
Webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of tweaks you can...
Read more >
webpack --watch isn't compiling changed files - Stack Overflow
So setting poll: true allows webpack to check the state of your program to see if any changes have been made, or at...
Read more >
grunt-webpack - npm
When set to true the grunt process/task will be kept alive after webpack task is finished. This is especially useful for watch and ......
Read more >
rollup.js
Rebuild the bundle when its source files change on disk. Note: While in watch mode, the ROLLUP_WATCH environment variable will be set to...
Read more >
An Introduction to Webpack Watch - Mastering JS
You can also enable watch mode from your Webpack config file: module.exports = { mode: 'development', watch: true, // Enable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found