Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why not move babel.config.js to package.json when Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In package.json #2985

Open
lovetingyuan opened this issue Nov 21, 2018 · 2 comments
Labels

Comments

@lovetingyuan
Copy link

lovetingyuan commented Nov 21, 2018

What problem does this feature solve?

As now, when I choose in package.json for question: Where do you prefer placing config for Babel, PostCSS, ESLint, etc., the babel config is not in package.json but output as babel.config.js .
I am not clear is it a bug or just be on purpose. Could you please tell me the reason if it is set up on purpose. thanks a lot!

Vue CLI v3.1.3

What does the proposed API look like?

add "babel" field in package.json to place babel config.

@haoqunjiang
Copy link
Member

haoqunjiang commented Nov 21, 2018

// always extract babel.config.js as this is the only way to apply
// project-wide configuration even to dependencies.
// TODO: this can be removed when Babel supports root: true in package.json

babel/babel#7961

@lovetingyuan
Copy link
Author

lovetingyuan commented Nov 21, 2018

Thanks for your reply.
I have found a new feature of babel here: https://github.com/babel/babel/blob/master/CHANGELOG.md#rocket-new-feature #8660
Better support monorepos by allowing users to opt into automatically resolving 'root' with rootMode
It may be helpful to this issue. thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants