-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WIP] Replace node-sass with sass-embedded #7321
Conversation
includePaths: [path.dirname(id)], | ||
}) | ||
.css.toString(); | ||
sassOutput = (await sass.compileAsync(id, {style: 'compressed'})).css; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently use the expanded style (i.e. https://unpkg.com/browse/@shopify/[email protected]/build/esm/styles.css)
I reckon we should stick to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! I assumed the equivalent of compact
was compressed
. Updated: 3467ae2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh duh, I'm wrong and skim-reading sorry.
In node-sass there were 4 output styles, in dart-sass there's only two. compressed
and expanded
continue to exist, while compact
and and nested
were removed (ooold context on what those look like).
I'd lean towards the more human-readable output when we publish to npm so it is easier to identify build output differences over time, so I'd prefer expanded
over compressed
.
WHAT is this pull request doing?
This PR replaces
node-sass
withsass-embedded
to align with the recentweb
upgrade. This was accomplished by updatingplugin-styles
to use thesass-embedded
compileAsync
API, running thesass-migrator
, and addressing a few minor build errors.While in draft, I plan to leave the migrated files uncommitted so reviewers have the opportunity to easily see the minimum required updates and run the
sass-migrator
themselves.Tophatting
sass-migrator
yarn prettier './polaris-react/**/*.scss' --write
polaris-react
and validate there are no build failuresHow to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes