-
Notifications
You must be signed in to change notification settings - Fork 23
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
css not being loaded #52
Comments
Hey @uriklar, thanks for reaching out!
You can see the example components and CSS being utilized here: https://stackblitz.com/edit/example-rollup-react-component-npm-package?file=package.json It'd be great to get some more background into what issues you're seeing. |
Hi @jaebradley. Thanks for the ultra quick response :-) |
@uriklar no worries - it's not particular clear from the Cheers! |
While we're here.. I was wondering if during your research you've found a good resource on building a tree shakable component library with Rollup (or even Webpack)? |
@uriklar are you tree-shaking ES6 modules only? Or are you transpiling ES6 modules into CommonJS? |
The latter, transpiling to common js too |
I think you need to tell Babel not to transpile ES6 modules so you can take advantage of static analysis. https://developers.google.com/web/fundamentals/performance/optimizing-javascript/tree-shaking/ I could definitely be missing the ball on something as I don't know exactly what your setup is. |
Thanks a lot! I'll try it out |
Hi @jaebradley ,
Thanks for the example! I'm trying to get my component lib to work with rollup and sass without success.
I cloned your repo, ran the build, and imported in a CRA I created and you css for the
an-example
class isn't being loaded in my app. Which is the exact same issue I'm having with my lib...Do you know what i'm doing wrong? Have you tried actually consuming these example components in an app and can verify the css get's injected?
Many thanks!
Uri
The text was updated successfully, but these errors were encountered: