-
With the Comet starter site, I am using the styles.scss for site wide overrides, general and custom styles. I have 23 custom components that @use the sales.scss (so far). Compiling after saving the styles.scss takes 5 minutes. Is there something I can do to speed this up? This seems quite ridiculously long. Pretty please help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I just did a test using my M1, and these are the numbers I'm seeing:
...so not seeing on my end the same results. Any chance I might be able to see your repo somewhere? If not, I'd be curious if you're seeing the same results if you do a fresh clone of the app with no major customizations. |
Beta Was this translation helpful? Give feedback.
-
OK I started a fresh app from repo. here is the repo with the test thank you for your help!!! |
Beta Was this translation helpful? Give feedback.
Ok, I think I figured it out. Adding these
@use
statements to import the base styles.scss file definitely are what are causing the extra compile time: https://github.com/treadway/test-comet/blob/fce5e3892f8bac977b645c471f0a68c94443845c/src/sections/BasicBanner/BasicBanner.scss#L1. I'm not 100% sure what the issue is, but it appears to be some cyclic issue with how you're importing the base scss file, which in itself is loading all of USWDS (which is a lot).To get around this issue, you can create a separate scss file to expose your variables, then import that into your components scss. Here is the general idea: MetroStar/comet-starter@main...scss-testing.
Based on my testing, I was able …