-
Notifications
You must be signed in to change notification settings - Fork 46
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
replace after emit logic for webpack v4.29+ #61
Comments
Running into this issue as well. The stack trace:
Anything we can do to work around, or any suggestions for submitting a fix? |
Getting same error
|
Until this PR get's merged we can use |
Any update on this? |
Helpful tip for anyone stumbling across this you can use patch-package along with code changes in #64 to fix this without using |
I will look into fixing but as I understand it, #64 doesn't look like the right fix. I think we can fix by taking a similar approach as in webpack/webpack#8883 |
Also getting this issue with nuxtJS, please keep us updated if a fix goes into a release :) Is it safe to use |
Webpack v4.29.0 introduced output.futureEmitAssets, which breaks the plugin when enabled. This is because we no longer have access to sourcemap contents. To work around this we can tap into the emittedAssets hook and keeo a map of sourceMaps and the content to be uploaded oncee asseets are emitted. This should work in webpack 4 and 5 and be end users should not notice any change in behavior. fixes #61 and closes #64
I see that there appears to be some work being done on this recently on the rework-after-emit branch. Any way I can help to push this across the finish line so that webpack 5 users (like me) can start using this plugin again? |
@mskelton yes rework-after-emit branch was effort to add support for Webpack 4.29+ with futureEmitAssets enabled. The hope was it would just work in v5 but turns out more is needed as its seems there's fairly major changes to the plugin architecture. At the time (just after v5 became "stable") there wasn't really any documentation. It seems that supporting v4 and v5 may in same version of plugin might be tricky. I'll try devote some time to this. |
@brandondoran Thanks for the update, let me know if I can help in any way. FWIW html-webpack-plugin is taking the same approach of having a new major version that is just for webpack 5 and won't support webpack 4. |
Webpack 4.29.0 introduced this option, which when enabled, breaks this plugin. The fix is to read the file contents from disk after emit instead of depending on the sources being available in the compilation. closes #61
) Webpack 4.29.0 introduced this option, which when enabled, breaks this plugin. The fix is to read the file contents from disk after emit instead of depending on the sources being available in the compilation. closes #61
Webpack v4.29.0 introduced
output.futureEmitAssets
which breaks this plugin. From the release:https://github.com/webpack/webpack/pull/8642/files
The text was updated successfully, but these errors were encountered: