Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packages/plugin-stylus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ export const PLUGIN_STYLUS_NAME = 'rsbuild:stylus';

type StylusOptions = {
use?: string[];
define?: [string, any, boolean?];
/**
* Define Stylus variables or functions.
*
* @default {}
* @example
* define: [
* ["$development", process.env.NODE_ENV === "development"],
* ["rawVar", 42, true],
* ]
*/
define?: [string, any, boolean?][];
include?: string[];
/**
* Import the specified Stylus files/paths, can not be relative path.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/en/plugins/list/plugin-stylus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To customize the compilation behavior of Stylus, use the following options.
```ts
type StylusOptions = {
use?: string[];
define?: [string, any, boolean?];
define?: [string, any, boolean?][];
include?: string[];
import?: string[];
resolveURL?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh/plugins/list/plugin-stylus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ console.log(style.title);
```ts
type StylusOptions = {
use?: string[];
define?: [string, any, boolean?];
define?: [string, any, boolean?][];
include?: string[];
import?: string[];
resolveURL?: boolean;
Expand Down
Loading