Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What's the difference between webpack and webpack watch?


Asked by Jaelynn Long on Dec 14, 2021 FAQ



Webpack is a tool that runs on your terminal and then compiles the *.vue files to *.js files. Pagekit has a default webpack.config.js on the root level. When you run webpack or webpack --watch in the Pagekit folder, it will traverse all themes and extensions in the packages subfolders.
Also,
When using webpack plugins make sure they're upgraded to the latest version, in most cases the latest version will include webpack 5 support. In some cases these upgraded webpack plugins will only support webpack 5. In case you're running into issues you can connect with the community in this help discussion.
Likewise, In the next major version webpack 4 support will be removed. In case you do have custom webpack configuration, either through custom plugins or your own modifications you'll have to take a few steps to ensure your applications works with webpack 5. When using next-transpile-modules make sure you use the latest version which includes this patch
Subsequently,
If you receive this message, it means that you have the npm package babel installed and are using the short notation of the loader in the webpack config (which is not valid anymore as of webpack 2.x): webpack then tries to load the babel package instead of the babel-loader.
Additionally,
Upgrade webpack 4 and its plugins/loaders 1 Make sure to use mode. Set mode to either production or development to make sure that corresponding defaults are set. 2 Update outdated options. 3 Test webpack 5 compatibility. Try to set the following options in your webpack 4 configuration and check if build still... More ...