An esbuild plugin that inlines SASS/SCSS files as injected <style> tags in the browser, eliminating the need for separate CSS files. Version 0.4.4 is the latest stable release, actively maintained with occasional dependency updates. It supports both ESM and CommonJS, ships TypeScript types, and differentiates from other esbuild CSS plugins by automatically creating a style element and appending compiled CSS to the DOM, supporting remote @imports via CDN. The only peer dependency is esbuild itself.
npm install esbuild-inline-sassNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin in an esbuild build pipeline to inline SCSS files.
Rename .css files to .scss or .sass, or preprocess them separately.
Use only in client-side code; avoid importing styles in Node.js builds or provide a conditional check.
N/A
Ensure remote URLs are accessible at runtime, or bundle dependencies locally.
Call the function: plugins: [inlineSass({minify: true})]Use const { inlineSass } = require('esbuild-inline-sass');Run 'npm install --save-dev esbuild-inline-sass' or check package.json.