Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

fix: babel transform ignore babel.config.js file #78

Merged
merged 1 commit into from
Jun 19, 2021

Conversation

huih99
Copy link
Contributor

@huih99 huih99 commented May 12, 2021

at the same question in #54 , should ignore babel.cofig.js too.

@underfin
Copy link
Owner

Not sure for this, if not set this, the babel of vite-plugin-vue2 internal will use babel.config.js?

@huih99
Copy link
Contributor Author

huih99 commented May 14, 2021

Yes, I'm pretty sure I've had this problem in my projects. And in Babel's documentation, ConfigFile is described:

configFile -- Default: path.resolve(opts.root, "babel.config.json").
Note: babel.config.json is supported from Babel 7.8.0. In older Babel 7 versions, only babel.config.js is supported.

this opts.root default is process.cwd(), this means that if you start the project with 'vite' at the project root, the 'babel.config.js' at the project root will be loaded by default

@underfin
Copy link
Owner

underfin commented May 29, 2021

configFile -- Default: path.resolve(opts.root, "babel.config.json").
Note: babel.config.json is supported from Babel 7.8.0. In older Babel 7 versions, only babel.config.js is supported.

Can you ponit the link of document? I not found this at https://babeljs.io/docs/en/options#configfile

@huih99
Copy link
Contributor Author

huih99 commented Jun 15, 2021

configFile -- Default: path.resolve(opts.root, "babel.config.json").
Note: babel.config.json is supported from Babel 7.8.0. In older Babel 7 versions, only babel.config.js is supported.

Can you ponit the link of document? I not found this at https://babeljs.io/docs/en/options#configfile

I looked for it, but I couldn’t find this description. I think the description here can also explain the problem, in the https://babeljs.io/docs/en/config-files#project-wide-configuration

@underfin underfin merged commit 89cd5ed into underfin:master Jun 19, 2021
@underfin underfin mentioned this pull request Jun 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants