v2.0.0
API Changes
Switch
andTextField
no longer autogenerate an aria-labelledby attribute for their input fields. They can be supplied via thelabelId
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.
- In both builds, you'll need handle css files. With webpack, use css-loader to handle the CSS files. For a babel-only solution, use babel-plugin-css-modules-transform.
- If applicable, you'll need to handle the svg files imported as well. Something like babel-plugin-inline-react-svg should do. For webpack, use react-svg-loader.