Custom node-sass importer to which allows you to use glob syntax in imports
Globbing allows pattern matching operators to be used to match multiple files at once.
// Import all files inside the `scss` directory and subdirectories.;
const sass = ;const globImporter = ;sass;
// webpack.config.jsconst globImporter = ;const ExtractTextPlugin = ;moduleexports =module:rules:test: /\.scss$/use: ExtractTextPluginplugins:filename: 'style.css'
node-sass --importer node_modules/node-sass-glob-importer/dist/cli.js -o dist src/index.scss
It is not possible anymore to set the
includePaths option when initializing the importer. Use the node-sass includePaths option instead.
This module is maintained in one repository together with multiple other node-sass custom importers. The node-sass-magic-importer repository is using a monorepo approach with fixed versions for all packages. The projects maintained in the node-sass-magic-importer monorepo started out as separate repositories with separate versioning, so when they were integrated into the monorepo, the versions of all projects were raised to 5.0.0 and are in sync since then.
This module is powered by node-sass-magic-importer.