-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
When selecting "separate config files", cli should .browserslistrc over package.json #1236
Comments
Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you! |
@LinusBorg I am trying to find where I could look for fixing this. Could you give me some directions? |
By default, all configs are written into package.json. If the user selects "separate config files", the tranforms defined in the above file will be used to extract configs from package.json into these files. So you would have to define a new transform for the browserslist field in that file. That could maybe be as simple as adding this to the export: module.exports = {
vue: makeJSTransform('vue.config.js'),
babel: makeJSONTransform('.babelrc'),
postcss: makeMutliExtensionJSONTransform('.postcssrc', true),
eslintConfig: makeMutliExtensionJSONTransform('.eslintrc', true),
jest: makeJSTransform('jest.config.js')
browserslist: makeJSONTransform('.browserslistrc')
} If we make this change, we have to make sure that these plugins actually respect .browserslistrc:
|
I just moved it to the file and I got this
|
https://github.com/browserslist/browserslist#browserslist- The .browserlistrc file seems to have a different syntax after all, it's not 100% JSON? You might have to write a new transform for that, probably. |
cli should create .browserslistrc file close #1236
Version
3.0.0-alpha.9
Steps to reproduce
"Where do you prefer placing config for Babel, PostCSS, ESLint, etc.?"
What is expected?
browserlist config to be in .browserlistrc file
What is actually happening?
The browserlist config is in the package.json
The text was updated successfully, but these errors were encountered: