I want to learn webpack again these days. Before, I just knew how to use it. I learned the video of technology fat. His webpack is version 3.6. I began to practice step by step according to the steps of the video, using vscode
When packing, an error is reported
Check your webpack version: 4.22.0. It is found that your webpack version is too high. The previous command is no longer applicable. Later, use the command: webpack Src/entry.js – O dist/bundle.js
You can see that entry.js has been packaged as a bundle.js file, but this has not been packaged successfully! Because there is no red error when packing, but there is a yellow warning. As shown below
The warning in the yellow part means that there are two modes: development mode and production mode. Next, find package.json. Add the “dev” and “build” information and their values
Similar Posts:
- Webpack 4 : ERROR in Entry module not found: Error: Can’t resolve ‘./src’
- Module not found: Error: Can’t resolve ‘bundle.js’ in…
- After project initialization, it appears: unable to load script from assets’ index.android.bundle
- [Solved] Webpack Error: [webpack-cli] Unable to load ‘@webpack-cli/serve’ command
- [Solved] Could not get BatchedBridge, make sure your bundle is packaged correctly
- Webpack packaging error: cannot find module ‘webpack / bin / config yargs’ error reason, [email protected] Step on the pit~
- Building for production… ERROR TypeError: Cannot read property ‘createHash‘ of undefined
- Webpack high version pulls out CSS style and reports an error [Solved]
- npm ERR! missing script: build [How to Solve]
- Invalid configuration object. Webpack has been initialised using a..