-
Notifications
You must be signed in to change notification settings - Fork 27
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
chore(rollup): assign babel dev env when running rollup #229
Conversation
Can you check what other libraries do? Since we don't run babel on this code from the MC-FE, wouldn't the prop types be left then in production? |
I looked into some libraries yes but couldn't find anything useful. I'll keep looking. Do you have other ideas how we can solve this? |
Might be related: facebook/create-react-app#209 What we could do maybe is to use the option This would ship the bundle with the What do you think? |
@emmenko that's exactly what I see in the |
d0defe9
to
b441fab
Compare
Alright, this should work now. Ref (https://github.com/kentcdodds/kcd-scripts/blob/master/src/config/babelrc.js#L70-L71) |
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 don't think this will work for us, and it doesn't seem to support custom proptypes.
Seems to be an open issue with |
…lup builds. Fixes #228
b441fab
to
b85fbb8
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.
Thanks. I guess we can keep track of the issue going forward
@@ -10,6 +10,7 @@ module.exports = function getBabePresetConfigForMcApp() { | |||
const isEnvDevelopment = env === 'development'; | |||
const isEnvProduction = env === 'production'; | |||
const isEnvTest = env === 'test'; | |||
const isRollup = process.env.BUILD_ROLLUP === true; |
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.
Build tool sniffing feels a bit odd but I can not think of anything else other than solving the issue somewhere entirely different.
Fixes #228
This is a simple proposal to fix the prop-types removal when running rollup builds.