6.0.2 • Published 1 month ago
@stylable/esbuild v6.0.2
@stylable/esbuild
@stylable/esbuild
Installation
npm install @stylable/esbuild
Usage
const { build } = require('esbuild');
const { stylablePlugin } = require('@stylable/esbuild');
build({
plugins: [stylablePlugin({ /* options */})],
});
Options
interface ESBuildOptions {
/**
* Determine the way css is injected to the document
* js - every js module contains the css and inject it independently
* css - emit bundled css asset to injected via link
*/
cssInjection?: 'js' | 'css';
/**
* Config how error and warning reported to esbuild by stylable
* auto - Stylable warning will emit esbuild warning and Stylable error will emit esbuild error
* strict - Stylable error and warning will emit esbuild error
* loose - Stylable error and warning will emit esbuild warning
*/
diagnosticsMode?: DiagnosticsMode;
/**
* A function to override Stylable instance default configuration options
*/
stylableConfig?: (config: StylableConfig, build: PluginBuild) => StylableConfig;
/**
* Use to load stylable config file.
* true - it will automatically detect the closest "stylable.config.js" file and use it.
* false - will not load any "stylable.config.js" file.
* string - will use the provided string as the "configFile" file path.
*/
configFile?: boolean | string;
/**
* Stylable build mode
*/
mode?: 'production' | 'development';
/**
* Determine the runtime stylesheet id kind used by the cssInjection js mode
* This sets the value of the st_id attribute on the stylesheet element
* default for dev - 'module+namespace'
* default for prod - 'namespace'
*/
runtimeStylesheetId?: 'module' | 'namespace' | 'module+namespace';
/**
* Optimization options
*/
optimize?: {
removeUnusedComponents?: boolean;
};
}
License
Copyright (c) 2023 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by an MIT license.
6.0.2
1 month ago
6.0.1
2 months ago
6.0.0
2 months ago
5.19.0
3 months ago
5.18.1
3 months ago
6.0.0-rc.3
4 months ago
5.18.0
4 months ago
6.0.0-rc.1
7 months ago
5.17.0
6 months ago
5.16.1
8 months ago
5.15.2
8 months ago
6.0.0-rc.2
7 months ago
5.16.0
8 months ago
5.15.1
10 months ago
5.15.0
10 months ago
5.14.0
11 months ago
5.13.0
11 months ago
5.12.0
11 months ago
5.11.1
12 months ago
5.11.0
1 year ago
5.9.0
1 year ago