NPM install babel-es2015 –save-dev error NPM install babel-es2015 –save-dev
Cause: Because the rookie did not use THE ES standard, but the introduction of VUe-video uses the ES standard, so the compilation error will be reported
Solution:
-
1 Step 1: Install
npm install babel-preset-es2015 --save-dev Copy the code
If yes, do not perform the second step
-
Step 2: Modify the webpack.base.conf.js configuration file and add the following code
module: { loaders: [ { test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel', query: { presets: ['es2015'] } } ] } Copy the code