-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
No longer will you have to manually add node_modules to your loadPaths option and worry about whether nested packages will work at all. No longer will you need to add ~s to your URLs and give up all portability. Now you can just pass importers:
[new NodePackageImporter()]and write@use 'pkg:library'and it’ll work just how you want out of the box.
(Offizieller Blogpost, Docs)
Vorher:
/* File: ./src/styles/index.scss */
@import '../../node_modules/bootstrap/scss/bootstrap';
Nachher:
/* File: ./src/styles/index.scss */
@import 'pkg:bootstrap';
Anforderungen
- sass bzw. sass-embedded ab Version 1.71 (kein node-sass!)
- der Buildprozess muss
sass.compile()nutzen statt der legacy JS API mitsass.render()
Buildtools, die die Anforderungen erfüllen
- ✅ Webpack (How-to)
- ✅ Vite (How-to, Mögliche Probleme)
- ✅ gulp-sass ab Version 6
- ❌ postcss-sass (nur legacy JS API)
Metadata
Metadata
Assignees
Labels
No labels