Sassport Dynamic Imports
Import dynamically in Sass using Sassport.
Quick Start
First, install Sassport and the Sassport-Dynamic module via NPM:
npm install sassport sassport-dynamic --save
Then, add any global $variables
that you want to use in your imports to Sassport using .globals({...})
:
var sassport = ;var sassportDynamic = ; ;
Any variables that you defined in .globals()
will now be interpolated with the !dynamic
loader:
// main.scss ;
This will output the same result as if you had @import 'themes/material';
.