persistent cache build dependency warning when "module" imported from esm build dependency #14645
youngderekm
started this conversation in
General
Replies: 3 comments 12 replies
-
I don't think it is related to webpack (look at stack trace), if you need help please create reproducible example and I will show you how to fix |
Beta Was this translation helpful? Give feedback.
10 replies
-
I've met the same problem. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have met the same problem in version 5.93.0 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
What is the current behavior?
My webpack configuration is an es module (webpack.config.mjs). It imports a file from another es module (type: "module") that imports
createRequire
from "module" in order to userequire.resolve
. I have cache.type = 'filesystem'. When the build dependencies are scanned, I get a warning that 'module' can't be resolved:If the current behavior is a bug, please provide the steps to reproduce.
In webpack.config.mjs:
from webpack-config/index.js:
webpack-config/package.json has
"type": "module"
.use
webpack serve
.warning is logged to the console.
What is the expected behavior?
Imports from built in node modules (like 'module') should be ignored.
Other relevant information:
webpack version: 5.51.2
Node.js version: v16.13.0
Operating System: Windows 10
Additional tools:
Beta Was this translation helpful? Give feedback.
All reactions