Webpack 4.0 Early Adopters

Source: Internet
Author: User

Released soon Webpack 4.0 is said to be 68%-98% faster, and then support no profile, so it looks like a good look.

So try A

Separation of Webpack and WEBPACK-CLI

Now the Execute Webpack command must be WEBPACK-CLI the package global installation

As for why, there's not much to explain.

0 configuration What's the argument?

Supports two mode---development and production

Development The default entry file is src under the index.js, the export file is dist under the Main.js file

" Scripts " : {    "start""webpack--mode development"   },

So it's good to add this file in Package.json, no need to say another Webpack.config.json

Production mode does not explain

Parameters such as color watch process are still supported

So we set

" Scripts " : {    "start""webpack--mode Development--watch--progress-- Colors"  },

This allows you to listen for file changes and compile.

Tell compile, I try to compile a bit console.log (1) speed is nearly 0 faster than 28ms.

Let's try something specific.

Looks like it's a lot quicker than before.

So, no doubt, use it quickly.

Webpack 4.0 Early Adopters

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.