-
Notifications
You must be signed in to change notification settings - Fork 78
feat: work needed to bring in self contained styles #632
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
Conversation
|
Deploy preview for fundamental-react ready! Built with commit df93d02 |
.size-limit
Outdated
| path: "lib/index.js", | ||
| limit: "50 KB" | ||
| config: "config/webpack.config.sizeLimit.js", | ||
| limit: "550 KB" |
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.
whoa. sad.
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.
did you read the description? 😈
50kb was gzipped, using the new custom webpack config I haven't been able to get it to return gzipped size to size-limit, so it is reporting the parsed size. While we're now at double the gzipped size (including the peer dependency weirdness).
We're really only 12kb larger than we were previously.
| } | ||
| ] | ||
| }, | ||
| externals: { |
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.
Wooo! 🎉 Thanks @bcullman
src/Button/Button.js
Outdated
| @@ -1,3 +1,4 @@ | |||
| import '../../node_modules/fundamental-styles/components/button.scss'; | |||
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.
Does this need to include the ../../node_modules in the path or could the import be simplified to import 'fundamental-styles/components/button.scss';?
bcullman
left a comment
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.
🚢
greg-a-smith
left a comment
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.
Looks good. 🚢
Description
This will be a breaking change for consumers as they will need to update their webpack config as detailed in the updated readme.
This pr brings in the self-contained styles for Button, updates/simplifies the webpack configuration, updates jest config to allow for parsing scss.
Size-limit was not setup to handle scss files, I copied their internal config as much as possible with the addition of scss loaders. Caveat: the output now contains our peerDependencies (? I can't figure out why) and is reporting our parsed size, not gzipped
MASTER:

This PR (note - peer dependencies like react-dom and react and some devdeps for webpack are now being included on the node_modules side - I've attempted to troubleshoot this for a while, but I think at this point it's out of range of the spike and should be a followup):

Build:index works again! Thanks @greg-a-smith