Registry / devops / esbuild-sass-plugin-ysink

esbuild-sass-plugin-ysink

JSON →
library2.3.4jsnpmunverified

Fork of esbuild-sass-plugin (v2.3.4, actively maintained) adding CSS modules support without auto-injection, plus a shelter mode for Discord scoped APIs. Differentiates from upstream by allowing `inject: false` for modules and `inject: 'shelter'` for unloading. Ships TypeScript types, supports postcss, and targets esbuild plugin ecosystem.

npm install esbuild-sass-plugin-ysink
INSTALL
IMPORT
SIG · ESBUILD-SASS-PLUGI
E
esbuild-sass-plugin-ysink
devopsjavascriptv2.3.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sassPlugin
import { sassPlugin } from 'esbuild-sass-plugin-ysink'
const sassPlugin = require('esbuild-sass-plugin-ysink')
ESM-only package; CommonJS require will fail.
postcssModules
import { postcssModules } from 'esbuild-sass-plugin-ysink'
const postcssModules = require('esbuild-sass-plugin-ysink').postcssModules
Named export, not default. Must be destructured.
sassPlugin
import sassPlugin from 'esbuild-sass-plugin-ysink'
Default import also works but named import is preferred for TypeScript.

Builds a TypeScript app with SCSS and CSS modules using esbuild, injecting CSS as text string.

import esbuild from 'esbuild'; import { sassPlugin, postcssModules } from 'esbuild-sass-plugin-ysink'; await esbuild.build({ entryPoints: ['src/app.ts'], bundle: true, outfile: 'dist/app.js', plugins: [ sassPlugin({ filter: /\.scss$/, transform: postcssModules({ inject: false, // CSS modules without auto-injection localsConvention: 'camelCase' }) }) ] });
Debug
Known issues
deprecatedPlugin options may change between minor versions; check changelog for breaking changes.
fix
Pin version if stability needed.
affects: >=2.0
gotchaWhen using `inject: false`, CSS modules return a string of CSS; you must handle insertion manually.
fix
Use `type: 'css-text'` in esbuild config or manually inject via style tag.
affects: >=2.0
breakingIn v2.0, the transform API changed from `postcssModules()` to accept options object directly.
fix
Update to new transform signature.
affects: >=2.0 <2.0
deprecatedOlder `inject: true` default is deprecated; future versions may require explicit `inject` setting.
fix
Set `inject: false` or `inject: 'shelter'` as needed.
affects: >=2.3
Errors
Common errors & fixes
Error: Cannot find module 'esbuild-sass-plugin-ysink'
Package not installed or incorrect import path.
fix
Run `npm install esbuild-sass-plugin-ysink` and ensure import path matches.
TypeError: sassPlugin is not a function
Importing default instead of named or using wrong package.
fix
Use `import { sassPlugin } from 'esbuild-sass-plugin-ysink'`.
Error: Unsupported transform: postcssModules is not a function
postcssModules not imported or used incorrectly.
fix
Import postcssModules: `import { postcssModules } from 'esbuild-sass-plugin-ysink'` and pass as transform function.
Error: [plugin: esbuild-sass-plugin] Expected 'inject' option
Missing `inject` property in postcssModules options.
fix
Add `inject: false` or `inject: 'shelter'` to postcssModules options.
Upgrade
Version history
2.3.4latest on npm
Audit
Dependencies
sassrequiredSass compiler for .scss/.sass files
Agent activity
2 hits · last 30 days
node
2
Resources
esbuild-sass-plugin-ysink — npm install esbuild-sass-plugin-ysink · libregistry