Skip to content
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

Incompatibility with Webpack 5 #64

Open
GorvGoyl opened this issue Nov 23, 2020 · 3 comments
Open

Incompatibility with Webpack 5 #64

GorvGoyl opened this issue Nov 23, 2020 · 3 comments
Labels
In Progress In progress

Comments

@GorvGoyl
Copy link

GorvGoyl commented Nov 23, 2020

I'm not able to run webpack in development mode when source-map is enabled and set to cheap-module-source-map or inline-source-map.
On digging I found out your plugin is not fully compatible with webpack v5 which is causing that issue.
To test:
node --trace-deprecation node_modules/webpack/bin/webpack.js
Output:

(node:14444) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
    at MergeJsonWebpackPlugin.addAssets (C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\merge-jsons-webpack-plugin\index.js:234:42)
    at C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\merge-jsons-webpack-plugin\index.js:38:30
    at tryCatch (C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\es6-promise\dist\lib\es6-promise\-internal.js:195:12)   
    at invokeCallback (C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\es6-promise\dist\lib\es6-promise\-internal.js:210:13)
    at publish (C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\es6-promise\dist\lib\es6-promise\-internal.js:178:7)     
    at flush (C:\Users\1gour\OneDrive\Documents\old\Github\Notion-Boost-browser-extension\node_modules\es6-promise\dist\lib\es6-promise\asap.js:98:5)
    at processTicksAndRejections (internal/process/task_queues.js:76:11)

You can see that webpack config file: https://github.com/GorvGoyl/Notion-Boost-browser-extension/blob/72c0da7202b2cbcd6006d553fe59035abdb8d9e4/webpack.config.js#L217

steps to reproduce:

  • Clone https://github.com/GorvGoyl/Notion-Boost-browser-extension/tree/webpack5_devtool_bug
  • npm install
  • run webpack in development mode npm run start:ch
  • build would fail with above error.

Other relevant information:
webpack version: 5.6.0
Node.js version: 12.15.0
Operating System: Win10
Additional tools: Powershell Core, VSCode

I previously filed this bug for Webpack webpack/webpack#12041

@tettusud tettusud added the In Progress In progress label Dec 26, 2020
@aarthishuba
Copy link
Collaborator

@GorvGoyl published new version 2.0.0-alpha, however it has some breaking changes in case of array behaviour, you can check read me file

@HoneyBadgerSeeker
Copy link

HoneyBadgerSeeker commented Jul 29, 2021

Even with the new version 2.0.0-alpha, I still get the warning on my project. It's not a big deal so far :)

@ybentz
Copy link

ybentz commented Sep 10, 2021

Hey! Any updates on this?
I found a couple of related issues on html-webpack-plugin that were fixed already in case that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In Progress In progress
Projects
None yet
Development

No branches or pull requests

5 participants