@@ -189,6 +189,18 @@ Or even bundled with all its dependencies:
189
189
< / script>
190
190
` ` `
191
191
192
+ Since the browser doesn't have access to the filesystem, the [` compile ()` ] and
193
+ ` compileAsync ()` functions aren't available for it. If you want to load other
194
+ files, you'll need to pass a [custom importer] to [` compileString ()` ] or
195
+ [` compileStringAsync ()` ]. The [legacy API] is also not supported in the browser.
196
+
197
+ [` compile ()` ]: https://sass-lang.com/documentation/js-api/functions/compile
198
+ [` compileAsync ()` ]: https://sass-lang.com/documentation/js-api/functions/compileAsync
199
+ [custom importer]: https://sass-lang.com/documentation/js-api/interfaces/StringOptionsWithImporter#importer
200
+ [` compileString ()` ]: https://sass-lang.com/documentation/js-api/functions/compileString
201
+ [` compileStringAsync ()` ]: https://sass-lang.com/documentation/js-api/functions/compileStringAsync
202
+ [legacy API]: #legacy-javascript-api
203
+
192
204
#### Legacy JavaScript API
193
205
194
206
Dart Sass also supports an older JavaScript API that's fully compatible with
@@ -197,8 +209,8 @@ Dart Sass also supports an older JavaScript API that's fully compatible with
197
209
and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects.
198
210
199
211
[Node Sass]: https://github.com/sass/node-sass
200
- [` render ()` ]: https://sass-lang.com/documentation/js-api/modules# render
201
- [` renderSync ()` ]: https://sass-lang.com/documentation/js-api/modules# renderSync
212
+ [` render ()` ]: https://sass-lang.com/documentation/js-api/functions/ render
213
+ [` renderSync ()` ]: https://sass-lang.com/documentation/js-api/functions/ renderSync
202
214
203
215
Sass's support for the legacy JavaScript API has the following limitations:
204
216
0 commit comments