-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support for extracting CSS #53
Comments
Hey, in short: yes 😸 It's the part of the library design. The long answer: still yes, but it's something complicated 🤔 I will provide more technical details once will have time, but it's more or less the same problem as in atlassian-labs/compiled#722. P.S. It's relatively easy to implement CSS extraction without chunks supports, but no one will be happy to see 300kb of CSS in a single chunk 💥 |
Thanks for the answer! |
Hi @layershifter, |
It's coming (#80) 🚀 It will take some time to find out issues, but I have already tested it on Fluent UI side in Storybook and it works like a charm 💎 |
Thanks a lot! |
Modules are not published yet, but they are fully buildable. It's not trivial to get it, but following commands should provide some direction for you 😉
|
Thanks a lot, I really appreciate your help. I successfully connected the package with the feature. Extracting CSS from components works fine, but extracting styles from the page doesn’t work. Print out the argument sourceCode of the function shouldTransformSourceCode in the file griffelWebpackExtractionLoader.ts:74:
Used packages: If you need more details I’d glad to help. |
@Dwlad90 this might be a problem with config (that is totally unclear without docs 🙄 ), I made a configured repo with latest Next.js: https://github.com/layershifter/griffel-extraction-test |
Thanks a lot, great job! |
Implemented for Webpack, check |
Thanks a lot for a package, its a great job! I was trying to use this package with nextJS using the mini-css-extract-plugin built-in but in its construction I get the following error:
Sandbox: https://codesandbox.io/s/withered-firefly-2ff6m8 I have to add the plugin with certain parameters to the pipeline so it’ll work properly:
Sandbox: https://codesandbox.io/s/hardcore-mendel-9xywyx Maybe you have an idea how can I use a built-in plugin? |
@Dwlad90 TBH I haven't tested it with Next.js, but I think that we can handle it. Would you mind to create a separate issue for this problem? P.S. Can you please create sandboxes without Nx? (with raw Next.js to make them simpler) |
@layershifter - i am experimenting with css extraction. First attempt shows that it works for makeStyles, but the makeStaticStyles seems to not be extracted, atleast javascript have to run before those styles are applied. Trying to figure out why |
@pksorensen indeed, |
I'd like to ask are you going to add support for extracting CSS?
The text was updated successfully, but these errors were encountered: