esbuild-plugin-sass-modules
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

esbuild-plugin-sass

Node.js CI

Plugin for esbuild to support SASS styles

Install

npm i esbuild esbuild-plugin-sass

Usage example

Create file src/test.scss:

body {
  &.isRed {
    background: red;
  }
}

Create file src/index.js:

import './test.scss'

Create file build.js:

const esbuild = require('esbuild');
const sassPlugin = require('esbuild-plugin-sass-modules')

esbuild.build({
    entryPoints: ['src/index.js'],
    bundle: true,
    outfile: 'bundle.js',
    plugins: [sassPlugin()],
}).catch((e) => console.error(e.message))

Run:

node build.js

File named bundle.css with following content will be created:

body.isRed {
  background: red;
}

Package Sidebar

Install

npm i esbuild-plugin-sass-modules

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

12.7 kB

Total Files

10

Last publish

Collaborators

  • dzearing