-
Notifications
You must be signed in to change notification settings - Fork 74
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
Removes Babel duplication in Webpack configs #435
Conversation
2254e8c
to
ccb15d7
Compare
ccb15d7
to
42c9176
Compare
Codecov Report
@@ Coverage Diff @@
## master #435 +/- ##
=========================================
+ Coverage 92.74% 92.8% +0.05%
=========================================
Files 2341 2345 +4
Lines 75708 75919 +211
=========================================
+ Hits 70212 70453 +241
+ Misses 5496 5466 -30
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say this is the moment to start using https://babeljs.io/docs/en/babel-preset-env, and get rid of es2015, stage-0, etc.
@didierofrivia That's the purpose of #394 .. unfortunately it's not working at all, so I thought it would be better to make smaller changes each team, starting with this one. |
cc937a8
to
254736b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, what do ou think @didierofrivia ?
f2ac8c5
to
c1247c3
Compare
Looks good, still circle ci needs to bless this PR. |
c1247c3
to
c73acfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I am not sure is if the bablerc will be exported in the image. If not we need tonverify that.
@hallelujah Please feel free to approve if you think it is enough verification to have the docker-build job |
What this PR does / why we need it:
Webpacker manages webpack itself, creating config files at compilation time. However this generated configs are being overridden in porta in a hardcoded way that leads to errors and uncontrolled results.
This PR gives this control back to Webpacker and Rails and apply all custom configs appropriately. This way config files look a bit more convoluted but also free us from managing webpack.js files.
Read more about how to manage webpack config with webpacker here.
Thanks to this change we are able to better handle specific setups (dev, test, prod..) as well as reduce duplicated code in a safer and more maintainable way by means of JS.