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

💥[BREAKING] Switch, TextField APIs; commonjs/module build changes #10

Merged
merged 9 commits into from
Aug 16, 2018

Conversation

petermikitsh
Copy link
Member

@petermikitsh petermikitsh commented Aug 16, 2018

API Changes

  • Switch and TextField no longer autogenerate an aria-labelledby attribute for their input fields. They can be supplied via the labelId prop. This change was needed to fix server-side rendering hydration errors on the client. uuid was also removed from dependencies, so expect a slightly smaller bundle size.

Build Changes

For versions 1.2.3 (inclusive) and prior, the distributions were incorrect.

  • The commonjs dist/index.js file had module ES module import/export syntax.
  • The commonjs source files had their css inlined (poor for performance and causes bundle size bloat).
  • The module build couldn't be tree-shaken since {sideEffects: false} was not set in package.json.
  • Both builds missed other opportunities for reducing bundle size, like removing prop types.

This PR addresses all of these things.

@petermikitsh petermikitsh merged commit 6accf72 into master Aug 16, 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
Development

Successfully merging this pull request may close these issues.

None yet

1 participant