[bug?] Piping not working when watch is true
See original GitHub issueType: bug (maybe)
What happens: Piping from webpack-stream to, say, gulp-concat
isn’t working when watch
is set to true.
Steps to reproduce
- Set up
webpack-stream
to acceptn
entries using either method in this project’s README - Ensure that watch isn’t on, and pipe the output to
gulp-concat
. - Observe that it works
- Turn on
watch
- Observe that it doesn’t work
Possible cause: This might have to do with the internals of webpack’s watch changing what is sent out from the pipe? I’m not sure – gotta investigate that.
Why am I doing this?
This is likely me being a goof somewhere. My set up is that I’ve got n
independent test files for a library. I want to build them with webpack into a single file that can be loaded into the browser.
Afaik webpack doesn’t support n
entry points into 1 file; each independent entry point is converted into its own “chunk.” For this reason, I’m piping webpack into gulp-concat
to produce a single file to load up in the browser.
I don’t want to manually maintain a list of test files, so somewhere along the line I’ve got to glob. I guess the two options are:
- somehow set up a
require();
in my code that allows for globbing - set up globbing when specifying my target files, then concatenating them
Option 1 seemed like more work (the glob-loader plugin isn’t very feature-ful…no source maps, for instance), so I was trying to do option 2.
Is this silly? : P
I’ll do my best to investigate this, but I figured I’d raise the issue in case anyone happens to know what the issue is.
p.s. super awesome library here, @shama!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:13 (3 by maintainers)
Top GitHub Comments
@jmeas I’m using run-sequence, but if the webpack task set
watch
totrue
, the task after webpack will never be executed.For example:
Then run
gulp build
, thewepback
task will be executed, butotherTask
will not.@minwe, correct. From my description above:
The current behavior produces a never-ending and blocking stream. With hope, @minwe’s solution, #109, will be a proper solution rather than the “clever finagling” that I went with. I’ve been meaning to pull down the branch to try it out for myself, but I haven’t had the free time.