@thedanbob/esbuild-plugin-sass
v3.0.0
Published
Sass plugin for [esbuild](https://esbuild.github.io/). This is basically a heavily stripped down version of [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin), you should probably just use that one.
Downloads
420
Readme
@thedanbob/esbuild-plugin-sass
Sass plugin for esbuild. This is basically a heavily stripped down version of esbuild-sass-plugin, you should probably just use that one.
Installation
npm install --save-dev esbuild @thedanbob/esbuild-plugin-sassHow to use
esbuild.config.js:
import { build } from "esbuild"
import sassPlugin from "@thedanbob/esbuild-plugin-sass"
await build({
// ...
plugins: [
sassPlugin({ /* config */ })
]
});app.scss:
/* Prepend with ~ to import from node_modules */
@import "~bootstrap/scss/bootstrap"Run:
node esbuild.config.jsConfig
filter
Type: RegExp
Default: /.(s[ac]ss|css)$/
Esbuild load filter (go syntax).
quietDeps
Type: boolean
Default: false
Silence warnings in dependencies.
silenceDeprecations
Type: DeprecationOrId[]
Default: []
Array of deprecations to silence.
transform
Type: (css: string, resolveDir: string, filePath: string) => string | Promise<string>
Default: undefined
Function that post-processes the CSS compiled by Sass before returning it to esbuild.
License
MIT
