Webpack 4.16.2 - Critical dependencies - the request of a dependency is an expression
See original GitHub issueWith Webpack 4.16.2 this import cause a critical dependencies warning:
import universal from 'react-universal-component'
With Webpack 4.8.0 works fine. I suppose this is the cause:
https://github.com/webpack/webpack/releases/tag/v4.16.2 handle module.require like require
In utils.js i found a module.require
.
Can you investigate about this? Thanks for your work!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:25
- Comments:25 (1 by maintainers)
Top Results From Across the Web
Webpack - Critical dependency: the request of a dependency ...
Webpack tries to resolve require calls statically to make a minimal bundle. When a library uses variables or expressions in a require call...
Read more >the request of a dependency is an expression - You.com
Webpack - Critical dependency: the request of a dependency is an expression - Stack Overflow. Manually configure webpack to import the required libraries...
Read more >node.js - webpack - iTecNote
Javascript – Webpack WARNING in ./node_modules/express/lib/view.js Critical dependency: the request of a dependency is an expression.
Read more >webpack/types.d.ts - UNPKG
The CDN for webpack. ... 466, * Is expression a runtime or compile-time value? ... 2351, dependencies: Dependency[];. 2352, blocks: AsyncDependenciesBlock ...
Read more >Hiding Critical Dependency Warnings from webpack - Medium
You can use the Webpack's ContextReplacementPlugin to acknowledge dependency warnings that you have investigated and found safe.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We might be able to work around it by treating as a string
‘let Module = require(
${url}
);’Yaaaaay!
Okay I’ll merge it tonight or tomorrow.
Heads up, there’s a React 16 rewrite on the way. It will be RUC 4 but I plan to support RUC 3 for a while ❤️
Thrilled these damn errors are gone.