Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Critical dependency: the request of a dependency is an expression #2

Closed
mnpenner opened this issue Nov 7, 2017 · 1 comment
Closed

Comments

@mnpenner
Copy link

mnpenner commented Nov 7, 2017

I'm getting these warnings in webpack 3.8.1

WARNING in ../myproject/node_modules/ajv-async/index.js
116:15-28 Critical dependency: the request of a dependency is an expression
 @ ../myproject/node_modules/ajv-async/index.js
 @ ../myproject/src/withSchema.js
 @ ../myproject/src/index.js
 @ ./src/components/forms/PersonForm.jsx
 @ ./src/index.jsx
 @ multi (webpack)-dev-server/client?http://0.0.0.0:3123 webpack/hot/dev-server ./src/index.jsx ./src/

WARNING in ../myproject/node_modules/ajv-async/index.js
93:20-33 Critical dependency: the request of a dependency is an expression
 @ ../myproject/node_modules/ajv-async/index.js
 @ ../myproject/src/withSchema.js
 @ ../myproject/src/index.js
 @ ./src/components/forms/PersonForm.jsx
 @ ./src/index.jsx
 @ multi (webpack)-dev-server/client?http://0.0.0.0:3123 webpack/hot/dev-server ./src/index.jsx ./src/

Even with

new IgnorePlugin(/regenerator|nodent/, /ajv-async/)

Could ajv-async perhaps be rewritten with require.context or dynamic import() or something to avoid these warnings?

@epoberezkin
Copy link
Member

It's a know webpack limitation, I don't understand why it is not addressed.

Having said that, the released beta version does not use require with an expression.

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

No branches or pull requests

2 participants