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

move browserslist and babel config into package.json #2633

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

skipkayhil
Copy link
Member

Running webpacker:install will now add browserslist and babel configuration into package.json instead of copying files. browserslist recommends using package.json key over rc file.

Use babel.config.js in npm package as a preset, providing updates and less complexity to apps. Fixes #2532 (at least partially)

Additionally, updated rubocop.yml to target ruby 2.4 since it is now the minimum supported version

@skipkayhil
Copy link
Member Author

@gauravtiwari any chance I could get some feedback on this? I really think it would be a beneficial change

@gauravtiwari
Copy link
Member

Thanks @skipkayhil looks great. I am sorry it took me a while to review. There is one config for react as well: https://github.com/rails/webpacker/blob/master/lib/install/examples/react/babel.config.js that we need to migrate to use package.json.

@skipkayhil skipkayhil force-pushed the use-package-json branch 2 times, most recently from 687663a to dc6c147 Compare August 17, 2020 17:53
- running webpacker:install will now add browserslist and babel
configuration into package.json instead of copying files
    - webpacker:install:react also updated to use preset in package.json

- use babel/preset.js in npm package as a preset, providing updates and
less complexity to apps
    - babel/preset-react.js can be used for react applications

- additionally, updated rubocop.yml to target ruby 2.4 since it is now
the minimum supported version
@gauravtiwari gauravtiwari merged commit 99ad629 into rails:master Aug 17, 2020
@skipkayhil skipkayhil deleted the use-package-json branch August 17, 2020 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create babel preset instead of copying entire config into project
2 participants