ajv

Webpack - Critical dependency: the request of a dependency is an expression

狂风中的少年 提交于 2019-12-03 10:24:50
问题 I am getting three warning messages when importing request in a barebone webpack project. A minimal example to reproduce the bug is available on GitHub (run npm install and npm start ). Critical dependency: the request of a dependency is an expression How can I get rid of this warning? More information: Webpack tries to resolve require calls statically to make a minimal bundle. When a library uses variables or expressions in a require call (such as require('' + 'nodent') in these lines of ajv

Webpack - Critical dependency: the request of a dependency is an expression

一世执手 提交于 2019-12-03 00:54:25
I am getting three warning messages when importing request in a barebone webpack project. A minimal example to reproduce the bug is available on GitHub (run npm install and npm start ). Critical dependency: the request of a dependency is an expression How can I get rid of this warning? More information: Webpack tries to resolve require calls statically to make a minimal bundle. When a library uses variables or expressions in a require call (such as require('' + 'nodent') in these lines of ajv ), Webpack cannot resolve them statically and imports the entire package. My rationale is that this