Add breaking change page for legacy-js-api#1193
Merged
Conversation
✅ Deploy Preview for sass-lang ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
nex3
requested changes
Sep 19, 2024
| Modern API [`Importer`]s instead contain two methods: `canonicalize`, which takes | ||
| in a rule URL and returns the canonical form of that URL; and `load`, which | ||
| takes in a canonical URL and returns an object with the contents | ||
| of the loaded stylesheet. Asynchronous importers have both of these methods |
Contributor
There was a problem hiding this comment.
I'd add a sentence here explaining that this split ensures that the same module is only loaded once and that relative URLs work consistently.
| returning a promise. | ||
|
|
||
| The modern API also uses a much more robust [`Value`] class that supports | ||
| type assertions and easy map and list lookups. |
Contributor
There was a problem hiding this comment.
I'd add "all Sass value types" to the list of things the new function API supports
| Vite still defaults to the legacy API, but you can similarly switch it by | ||
| setting `api` to `"modern"` or `"modern-compiler"`. See [Vite's documentation] | ||
| for more details. | ||
|
|
Contributor
There was a problem hiding this comment.
Maybe also add a note that for other bundlers or frameworks, check the documentation or issue tracker for information about supporting the modern Sass API?
nex3
approved these changes
Sep 19, 2024
jgerigmeyer
added a commit
to oddbird/sass-site
that referenced
this pull request
Sep 20, 2024
* main: (23 commits) [Playground] Click to Copy (sass#1177) Cut a release for a new Dart Sass version [Playground] Debug links (sass#1179) Add breaking change page for legacy-js-api (sass#1193) [Playground] Autocomplete (sass#1166) Add a breaking change page for color functions (sass#1192) Remove nonexisting `color.saturate()` function (sass#1190) Fix unprefixed `color.adjust()` name (sass#1188) Sort color functions alphabetically (sass#1187) Document color migrator (sass#1186) Cut a release for a new Dart Sass version Document new color spaces (sass#1055) (sass#1115) Cut a release for a new Dart Sass version Bump date-fns from 3.6.0 to 4.0.0 (sass#1181) Bump rollup from 4.21.2 to 4.21.3 (sass#1182) Bump @codemirror/autocomplete from 6.18.0 to 6.18.1 (sass#1183) Bump @typescript-eslint/eslint-plugin from 8.5.0 to 8.6.0 (sass#1185) Bump markdown-it-anchor from 9.1.0 to 9.2.0 (sass#1184) Fix footer not showing the latest versions. (sass#1178) [Playground] Code links (sass#1167) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.