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

[v2] Switch babel over to babel-preset-env #717

Merged
merged 3 commits into from Apr 22, 2017
Merged

[v2] Switch babel over to babel-preset-env #717

merged 3 commits into from Apr 22, 2017

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 20, 2017

  • Switch to babel-preset-env in loose mode
  • Remove all propTypes in production bundle
  • Remove last occurrence of Array.from

Fix #684

Also add transform-react-remove-prop-types in prod,
and disable flow-react-proptypes in prod.
@kopax
Copy link
Contributor

kopax commented Apr 21, 2017

Hi @philpl, do you think it would be possible to deploy a fix for this when releasing v2?

styled-components/babel-plugin-styled-components#33

I have a library bootstrap styled, made on styled that is almost 670kb. I am about to release but i I can't get under 500kb and the library produce a warning. I am almost sure this would reduce the size enough for us. Thanks in advance.

@kitten
Copy link
Member Author

kitten commented Apr 22, 2017

@kopax I've got a PR for it, I only have to finish it up, so will do 😀

@k15a do you have time to review this and #714? Max and Glen are busy and these two PRs are the only ones left for a potential v2 RC

const nodes = document.querySelectorAll(`[${SC_ATTR}]`)
const nodesLength = nodes.length

for (let i = 0; i < nodesLength; i += 1) {
Copy link
Member

Choose a reason for hiding this comment

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

Any drawbacks of using a for of loop here?

Copy link
Member Author

Choose a reason for hiding this comment

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

There shouldn't be :) it's just a tiny bit faster and less hackier than converting that into an array

@kitten kitten merged commit 43ebf90 into v2 Apr 22, 2017
@k15a k15a deleted the v2-babel-preset-env branch May 22, 2017 08:12
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.

None yet

3 participants