About Webpack under hot update? & Auto Refresh? (Non-VUE-CLI)

Source: Internet
Author: User

When writing essays: webpack4.6.0

Why is the title used? Because Swaiiow is not sure whether to use the correct words, it is probably the saying:

Webpack4.0 introduces production mode and development mode, and does not compress after using webpack in development, so only--mode mode development can be added to Webpack packaging commands. If you do not have mode development will automatically use the production mode, all the packaged code will be compressed, there is no way to debug

Practice:

The Bundle.js file introduced by index.html must be the path to Webpack-dev-server because Bundle.js is dynamically created

The startup mode of Webpack-dev-server is tested:

Configuration under Package.json:

"Scripts": {"test": "Echo \" Error:no test specified\ "&& exit 1","dev": "Webpack-dev-server-- Mode development "," server ":" Webpack-dev-server "," Serverhot ":" Webpack-dev-server--hot--inline " }

Start with development: Update fast, modify the entry file, immediately refresh no parameters: will be automatically compiled and refreshed, very slow--hot--inline will be automatically compiled, but will not refresh, should be for the module load????

About Webpack under hot update? & Auto Refresh? (Non-VUE-CLI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.