according to the online said pakage.json dependencies and devDependencies, the former needs to be deployed to the formal environment, the latter is to compile the local code, in my code babel related are in devDependencies, that is to say, bild process babel to static in the es6 syntax compiled into es5 syntax can, but I npm run build in the dist folder to see me write in the es6 syntax in static, and not compiled into es5 syntax,
excuse me some of the principles in the middle of what is.
the dependencies and devDependencies found on the Internet are basically environmental differences
.babelrc file
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-runtime"],
"env": {
"test": {
"presets": ["env", "stage-2"],
"plugins": ["istanbul"]
}
}
}