sass-dev

raw JSON →
1.0.13 verified Fri May 01 auth: no javascript

sass-dev is a command-line tool that uses esbuild to dynamically compile Sass/SCSS files to CSS, designed for development workflows. Current stable version is 1.0.13. It supports watching directories and rebuilding on changes. Unlike full-featured build tools like Webpack or Gulp, sass-dev focuses solely on Sass compilation with minimal configuration, leveraging esbuild's speed. It is a lightweight alternative to node-sass or sass CLI, but offers no customization options like output style or source maps. Release cadence is low; maintained sporadically on GitHub. Not recommended for production use.

error Error: Cannot find module 'esbuild'
cause esbuild is a peer dependency required at runtime but not auto-installed with -g flag.
fix
Install esbuild globally: npm install -g esbuild
gotcha As of v1.0.13, sass-dev does not support output style options (nested, expanded, compressed) or source maps. Output is always expanded.
fix Use node-sass or sass CLI for full feature set.
gotcha sass-dev may not handle partial files (files starting with underscore) correctly. It compiles them to CSS, which may be undesirable.
fix Manually exclude partial files from input paths.
npm install sass-dev
yarn add sass-dev
pnpm add sass-dev

Installs globally and runs as a CLI command to watch and compile Sass files.

// sass-dev is a CLI tool, not an importable module. To use it:
// Install globally: npm install -g sass-dev
// Then run in terminal:
sass-dev .
// Or specify paths:
sass-dev src/styles dist/css
// This will watch src/styles for .scss files and compile to dist/css.