Skip to content

Conversation

@jbadan
Copy link
Contributor

@jbadan jbadan commented Jun 27, 2019

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:
Screen Shot 2019-06-26 at 2 53 30 PM

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):
Screen Shot 2019-06-27 at 8 44 32 AM

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

@netlify
Copy link

netlify bot commented Jun 27, 2019

Deploy preview for fundamental-react ready!

Built with commit df93d02

https://deploy-preview-632--fundamental-react.netlify.com

.size-limit Outdated
path: "lib/index.js",
limit: "50 KB"
config: "config/webpack.config.sizeLimit.js",
limit: "550 KB"
Copy link
Contributor

Choose a reason for hiding this comment

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

whoa. sad.

Copy link
Contributor Author

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: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wooo! 🎉 Thanks @bcullman

@@ -1,3 +1,4 @@
import '../../node_modules/fundamental-styles/components/button.scss';
Copy link
Contributor

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';?

Copy link
Contributor

@bcullman bcullman left a comment

Choose a reason for hiding this comment

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

🚢

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

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

Looks good. 🚢

@jbadan jbadan merged commit d27dfd4 into master Jul 1, 2019
@jbadan jbadan deleted the fix/self-contained branch July 1, 2019 21:14
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.

4 participants