Replies: 4 comments
-
please create small reproducible repo |
Beta Was this translation helpful? Give feedback.
-
I used the setTimeout timer to do an asynchronous import of C files, but I found that the import of C files would get an error. Error: Cannot find module './static/js/1.js' code :
b.js
c.js
webpack config ;
After running Webpack compile . run
After 1 second |
Beta Was this translation helpful? Give feedback.
-
It depends on how I configure it. If I configure it this way, it's fine
But I want to add the static/js directory in front of the JS file so that I can better distinguish between JS, HTML and CSS Then I also have a problem configuring Webpack this way
|
Beta Was this translation helpful? Give feedback.
-
problem in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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?
Other relevant information:
webpack version: 4 or 5
Node.js version: 16
Operating System: mac or windows
Additional tools:
I was packaging the Node service code,I use, libraryTarget: "umd", or libraryTarget: "commonJS",
If you are using splitChunks or webpack.optimize.CommonsChunkPlugin or Dynamic Imports () => import('@/views/login') ,When running JS, an error is reported when referring to the split code。 This is a problem in both has webpack4 and 5 。
Beta Was this translation helpful? Give feedback.
All reactions