Come faccio a forzare babel NOT a guardare la directory principale per .babelrc
?Disabilitare l'ereditarietà .babelrc
- ho due
.babelrc
file:./a/.babelrc
e./a/example/.babelrc
. - Sono in esecuzione
babel
nel percorso./a/example
. ./a/.babelrc
definisce un plugin “lodash"- Non voglio usare questo plugin durante l'esecuzione babel in
./a/example
Ho provato a fissare ./a/example/.babelrc
a:.
{
"stage": 0,
"plugins": []
}
Tuttavia, l'esecuzione babel
nel percorso ./a/example
utilizza ancora il plug-in "lodash"
$ pwd
/a/example
$ cat ./.babelrc
{
"stage": 0,
"plugins": []
}
$ cat ./../.babelrc
{
"stage": 0,
"plugins": [
"lodash"
]
}
$ babel ./src/
Error: ENOENT: no such file or directory, scandir '/a/node_modules/babel-plugin-lodash/node_modules/lodash'
[..]
$ babel --babelrc ./.babelrc ./src/
Error: ENOENT: no such file or directory, scandir '/a/node_modules/babel-plugin-lodash/node_modules/lodash'
[..]
Esiste un problema che fa riferimento a tali modifiche per v6 @Gajus? – JMM
@ JMM, no. Ho imparato a conoscerlo dalla chat con l'autore. – Gajus
. @ Gajus OK grazie, questo è quello che ho capito :) Questo dovrebbe essere nel problema 6.0 però. – JMM