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

Support for webpack 5 #34

Open
scinos opened this issue Nov 30, 2020 · 5 comments
Open

Support for webpack 5 #34

scinos opened this issue Nov 30, 2020 · 5 comments

Comments

@scinos
Copy link

scinos commented Nov 30, 2020

When using with Webpack 5, the following deprecation warnings are raised:

(node:45131) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_LENGTH] DeprecationWarning: Compilation.chunks was changed from Array to Set (using Array property 'length' is deprecated)
    at Set.get (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/util/deprecation.js:151:4)
    at isArrayLike (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:445:42)
    at iterator (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:956:9)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:979:24
    at eachOfLimit (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1041:24)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:23:7
    at Hook.eval [as callAsync] (eval at create (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.emitAssets (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/Compiler.js:763:19)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/Compiler.js:412:10
(node:45131) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER] DeprecationWarning: Compilation.chunks was changed from Array to Set (indexing Array is deprecated)
    at Set.fn (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/util/deprecation.js:128:4)
    at next (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:930:40)
    at replenish (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1002:28)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1016:9
    at eachOfLimit (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1041:24)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:23:7
    at Hook.eval [as callAsync] (eval at create (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.emitAssets (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/Compiler.js:763:19)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/Compiler.js:412:10
(node:45131) [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 /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:101:42
    at Set.forEach (<anonymous>)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:27:21
    at replenish (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1011:17)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1016:9
    at eachOfLimit (/Users/sergio/src/automattic/wp-calypso/node_modules/async/dist/async.js:1041:24)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:23:7
    at Hook.eval [as callAsync] (eval at create (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.emitAssets (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/Compiler.js:763:19)
(node:45131) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_PUSH] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'push' is deprecated)
    at Set.set.push (/Users/sergio/src/automattic/wp-calypso/node_modules/webpack/lib/util/deprecation.js:108:3)
    at /Users/sergio/src/automattic/wp-calypso/node_modules/webpack-rtl-plugin/src/index.js:107:28
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
@mufaddalmw
Copy link

Same here, below warning is thrown, however compilation works as expected for RTL but this warning must be fix @romainberger -

[DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_LENGTH] DeprecationWarning: Compilation.chunks was changed from Array to Set (using Array property 'length' is deprecated)
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:34634) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER] DeprecationWarning: Compilation.chunks was changed from Array to Set (indexing Array is deprecated)
(node:34634) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_PUSH] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'push' is deprecated)
(node:34634) [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_*.

@fasergeyte
Copy link

Is this repository still maintained?

@fasergeyte
Copy link

fasergeyte commented Sep 20, 2021

I created a PR with fixing these deprecation warnings #37 (comment)

@suhailkc
Copy link

Any updates 👀 ?

@tarun-themesbrand
Copy link

When i use Webpack 5 in node i am getting same error.

(node:17184) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_LENGTH] DeprecationWarning: Compilation.chunks was changed from Array to Set (using Array property 'length' is deprecated)
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:17184) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_INDEXER] DeprecationWarning: Compilation.chunks was changed from Array to Set (indexing Array is deprecated)        
(node:17184) [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_*.
(node:17184) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET_PUSH] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'push' is deprecated)

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

No branches or pull requests

5 participants