Skip to content

5 minute SASS compile times #115

Answered by jbouder
treadway asked this question in Q&A
Feb 21, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

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 …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jbouder
Comment options

@jbouder
Comment options

Answer selected by jbouder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants