-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not wait for process to finish #37
Comments
Same issue here,plugin should wait for process to finish if possible. It's causing a compile loop for me because the pre-build process emits input for the actual webpack compilation after webpack has already completed its build process. |
Just made a pr #50 |
It would be great to get this merged - this is a pretty big blocker for using this lib for us. |
Is there any update on merging the PR? I can use npm pre- hook for now, but it doesn't execute when webpack rebuild the project on watch. This is a great plugin, it would be perfect for me if this feature is implemented. thanks! |
Having the compile loop issue here too. would love to see this being merged! |
I made a fork that allows you to block until the scripts finish execution. please check it out: https://www.npmjs.com/package/webpack-synchronizable-shell-plugin |
We have a process that writes a value to a file which is then required by the actual build process like this:
Then, the "version file" generated as above is
require()
d in the application source.It turns out this plugin does not wait for the command to finish before passing control back to webpack, because today we got an error during the JS build:
Here is a more minimal demonstration:
Then, if you run your build as usual, it will actually finish before the file has been created. This prevents you from
require()
ing files generated as such in your webpack project.I see 2 solutions:
The text was updated successfully, but these errors were encountered: