gpt4 book ai didi

javascript - 从不同路径使用 .babelrc

转载 作者:搜寻专家 更新时间:2023-11-01 04:29:59 24 4
gpt4 key购买 nike

有没有办法将 .babelrc 文件的路径提供给 babel-cli?像这样的东西:

babel src --out-dir lib --config random-folder/sub-folder/.babelrc

最佳答案

你可以将 .babelrc 文件放在其他 5 个模块的共享父目录中作为 lookup behavior关于 .babelrc 的 babel 是:

Babel will look for a .babelrc in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a .babelrc, or a package.json with a "babel": {} hash within.

关于javascript - 从不同路径使用 .babelrc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38520862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com