Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Latest commit

 

History

History
36 lines (27 loc) · 850 Bytes

README.md

File metadata and controls

36 lines (27 loc) · 850 Bytes

esbuild-scss-modules-plugin

No longer maintained - see https://www.npmjs.com/package/esbuild-sass-plugin

Plugin to use scss and css modules with esbuild. Based on indooorsman/esbuild-css-modules-plugin.

npm

Example

import esbuild from "esbuild";
import {ScssModulesPlugin} from "esbuild-scss-modules-plugin";

const result = await esbuild.build({
    entryPoints: ['src/index.ts'],
    bundle: true,
    outfile: 'dist/index.js',

    plugins: [
        ScssModulesPlugin({
            inject: false,
            minify: true,
            cssCallback: (css) => console.log(css),
        })
    ]
})

Options

See index.ts

License

MIT