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

Setup babel-preset-cra-universal #129

Merged

Conversation

ajchili
Copy link
Contributor

@ajchili ajchili commented Nov 20, 2018

Followed suggestion from #128 to implement a custom Babel preset. This is a copy of babel-preset-razzle and only offers name changes to the babel-preset-razzle. Should there be any changes needed feel free to request them for this PR and I will try to get to them asap 🙂

@codecov-io
Copy link

codecov-io commented Nov 20, 2018

Codecov Report

Merging #129 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #129   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines          67     67           
  Branches       13     13           
=====================================
  Hits           67     67

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfd9981...0b4cf0d. Read the comment docs.

@antonybudianto
Copy link
Owner

antonybudianto commented Nov 20, 2018

Hi, thanks for the PR! 🎉

Since cra-universal already used Babel 7, we also must use some of their official scoped packaged

The presets and plugins used:
https://github.com/antonybudianto/cra-universal/blob/master/packages/cra-universal/src/config/server/.babelrc

This is the presets and plugins dependency list:
https://github.com/antonybudianto/cra-universal/blob/master/packages/cra-universal/package.json

Let me know if you need any help.

"babel-plugin-transform-react-remove-prop-types": "0.3.2",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.3.3",
"babel-preset-react": "6.23.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some of the package should use @babel scoped package, example: @babel/preset-env, @babel/preset-react

@antonybudianto
Copy link
Owner

Hi @ajchili , any updates on this?

@ajchili
Copy link
Contributor Author

ajchili commented Nov 28, 2018 via email

@antonybudianto
Copy link
Owner

Cool @ajchili , thanks for the update, just let me know if you need some help 👍

@ajchili
Copy link
Contributor Author

ajchili commented Dec 1, 2018

Made the requested changes. I hope I did them right. If not I may need some help as I am still learning what a babel preset is and how to create one.

@antonybudianto
Copy link
Owner

Thanks, let me fix some of the dependencies

@antonybudianto antonybudianto merged commit d862a1f into antonybudianto:master Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants