Building environments for Webpack and Vue

Source: Internet
Author: User

The front end is really changing, and the tutorials are a lot different before long. The environment took a couple of hours, and finally got it right.

Start with someone else's old version of the tutorial, you can first press this to:

Click to view the old version

You can follow this first, following the tutorial to start packing will be an error. Now let's talk about the pits which are not the same as now.

    1. Error One: Now Webpack has not supported the custom attribute, so webpack.config.js in the favlist key value pair to be deleted.
    2. Error two: Config.resolve.extensions[0] can not be empty, so to delete the corresponding array of the first item of the empty string, leaving only '. js ' and '. Vue ' two.
    3. Error Three: Unable to find the ' Vue-template-compiler ' module. Can be installed directly with NPM install Vue-template-compiler--save-dev.
    4. Error four: cannot omit '-loader '. In the current Loaders option, add the '-loader ' suffix to the loader in each item in the Module.loaders. That ' vue ' = ' vue-loader ', ' babel?presets=es2015 ' = ' babel-loader?presets=es2015 '.

The back of the hot-loaded plug-in followed it away is OK. Just the sauce.

Building environments for Webpack and Vue

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.