Node Sass importer for resolving from a CDN
This is ALPHA software.
It's messy. It's probably slow. It's probably buggy.
Give it a shot. File bugs. Be patient.
- Node >= 6
- node-sass >= 4.9.0
This package has a peer dependency on Node Sass for ensure import API compatibility.
npm install @node-sass/cdn-importer node-sass
As a convenience if an
@import URL is prefixed by
unpgk: the importer will resolve UNPKG short-hand syntax.
Node Sass API
var sass = ;var cdnImporter = ;sass;
Node Sass CLI
$ node-sass index.scss --importer node_modules/@node-sass/cdn-importer/index.js
Because of how inefficient synchronous network requests are this importer does not work with
Single files only
@imports in the resolved file won't have the
cdn: prefix this impoter is only useful for single file packages like normalize.css