Usage
Designed for usage with esbuild-sass-plugin. Supports both SASS and SCSS wildcard imports.
Getting Started
npm i esbuild-sass-glob
Import the module and use it inside of your esbuild-sass-plugin precompile function option.
import sassGlob from 'esbuild-sass-glob';
esbuild.build({
...,
plugins: [
sassPlugin({
precompile: (source, pathname) => {
return sassGlob(source, pathname);
},
}),
],
...
})
SCSS Examples
@import './**/*.scss';
@import './*.scss';
Inspired by webpack-import-glob-loader.