Registry / devops / esbuild-plugin-ekscss

esbuild-plugin-ekscss

JSON →
library0.0.23jsnpmunverified

An esbuild plugin that adds support for XCSS (extensible CSS) preprocessing during bundling. Current stable version 0.0.23, actively maintained. Integrates with esbuild >=0.13.0 and ekscss ^0.0.23. Differentiates from other CSS plugins by leveraging the ekscss preprocessor for custom syntax and variables.

npm install esbuild-plugin-ekscss
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-EKS
E
esbuild-plugin-ekscss
devopsjavascriptv0.0.23
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.

ekscssPlugin
import { ekscssPlugin } from 'esbuild-plugin-ekscss'
const ekscssPlugin = require('esbuild-plugin-ekscss')
ESM-only package. No default export; use named import.
xcssPlugin
import { ekscssPlugin } from 'esbuild-plugin-ekscss'
import { xcssPlugin } from 'esbuild-plugin-ekscss'
The exported symbol is ekscssPlugin, not xcssPlugin.
PluginOptions
import type { PluginOptions } from 'esbuild-plugin-ekscss'
import { PluginOptions } from 'esbuild-plugin-ekscss'
PluginOptions is a TypeScript interface; use type import to avoid runtime emission.

Shows basic usage of esbuild-plugin-ekscss with esbuild's build API, bundling XCSS files.

import { build } from 'esbuild'; import { ekscssPlugin } from 'esbuild-plugin-ekscss'; await build({ entryPoints: ['src/index.js'], bundle: true, outfile: 'dist/bundle.js', plugins: [ekscssPlugin()], });
Debug
Known issues
breakingekscss 0.0.23 introduced changes that may break XCSS syntax used in earlier versions
fix
Review ekscss changelog for updated syntax rules.
affects: >=0.0.23
deprecatedThe 'loader' option in plugin options is deprecated and will be removed in v1.0.0
fix
Use 'filter' option instead.
affects: >=0.0.20
gotchaPlugin will not process files that are not imported/required in the bundle
fix
Ensure all XCSS files are imported in your entry points or use esbuild's 'inject' option.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'esbuild-plugin-ekscss'
Package not installed or mismatched peer dependencies
fix
Run npm install esbuild-plugin-ekscss ekscss esbuild@latest
TypeError: (intermediate value).filter is not a function
ekscssPlugin() called without options or with invalid options
fix
Call ekscssPlugin() without arguments or with an object: ekscssPlugin({ filter: /.*\.xcss$/ })
Error: Build failed with 1 error: error: Expected ';'
XCSS syntax error in a .xcss file
fix
Check your XCSS file for missing semicolons or incorrect syntax per ekscss spec.
Upgrade
Version history
0.0.23latest on npm
Audit
Dependencies
ekscssrequiredPeer dependency providing the XCSS preprocessor
esbuildrequiredPeer dependency: integrates as an esbuild plugin
Agent activity
2 hits · last 30 days
node
2
Resources
esbuild-plugin-ekscss — npm install esbuild-plugin-ekscss · libregistry