You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module parse failed: Cannot read properties of undefined (reading 'type')
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
TypeError: Cannot read properties of undefined (reading 'type')
at collectDeclaration (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/ConstPlugin.js:26:16)
at getHoistedDeclarations (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/ConstPlugin.js:110:7)
at /Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/ConstPlugin.js:196:25
at Hook.eval [as call] (eval at create (/Users/chenyulun390/learn/testwebpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:16)
at Hook.CALL_DELEGATE [as _call] (/Users/chenyulun390/learn/testwebpack/node_modules/tapable/lib/Hook.js:14:14)
at JavascriptParser.walkIfStatement (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/javascript/JavascriptParser.js:1805:41)
at JavascriptParser.walkStatement (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/javascript/JavascriptParser.js:1736:10)
at JavascriptParser.walkStatements (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/javascript/JavascriptParser.js:1613:9)
at JavascriptParser.parse (/Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/javascript/JavascriptParser.js:3593:9)
at /Users/chenyulun390/learn/testwebpack/node_modules/webpack/lib/NormalModule.js:1092:26
webpack 5.82.0 compiled with 1 error in 98 ms
If the current behavior is a bug, please provide the steps to reproduce.
consttest={a:1,b:2,c: 3}if(process.env.NODE_ENV==='development'){// if (true) {const{
a,
...other}=test;console.log('development:',other);}else{const{
b,
...other}=test;console.log('production:',other);}
I added @babel/plugin-transform-block-scoping to the Babel plugin, but did not add @babel/plugin-transform-spread,
Because hermes@0.7.2 does not support the following code
for(leti=0;i<5;i++){setTimeout(()=>console.log(i),1);// All returns here are 4}
Bug report
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Do it need to add a non empty judgment here?
Other relevant information:
webpack version: 5.82.0
Node.js version: v16.17.0
Operating System: macOS
Additional tools:
The text was updated successfully, but these errors were encountered: