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.
- Error One: Now Webpack has not supported the custom attribute, so webpack.config.js in the favlist key value pair to be deleted.
- 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.
- Error Three: Unable to find the ' Vue-template-compiler ' module. Can be installed directly with NPM install Vue-template-compiler--save-dev.
- 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