How can the babel command skip the translation of certain files?
Currently using:
babel src -s -D -d dist
.babelrc
{
"presets": [
"es2015",
"stage-2"
],
"plugins": [
["transform-runtime", {
"polyfill": false,
"regenerator": true
}]
]
}
All files in src will be translated and saved to dist
Now you need to save the src/app files directly to dist without translation, while other files in src will still be translated.
Thanks! ! !
I have a question, why don’t you take a look
babel --help
-i, --ignore [regex]
node_modules
You can use
--ignore
或者--copy-file
parameters:--copy-file
I haven’t used it specifically, you can refer toHow to use the CLI tools