We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to migrate from webpack to rsbuild here but stuck:
Webpack's stylus loader has the define option: https://webpack.js.org/loaders/stylus-loader/#stylusoptions
define
type stylusOptions = | { use: Array<string | Function>; include: Array<string>; import: Array<string>; define: Array; // <------------------------------ this one is missing includeCSS: false; resolveURL: boolean | Object; lineNumbers: boolean; hoistAtrules: boolean; compress: boolean; } | (loaderContext: LoaderContext) => Array<string>;
In my app, this enables to pass over some variables from the code to the styles which is extremely useful, such as media sizes.
If this could be added, that would be great. Thanks.
Presently, rsbuild has these types under @rsbuild/plugin-stylus/dist-types/index.d.ts:
type StylusOptions = { use?: string[]; include?: string[]; import?: string; resolveURL?: boolean; lineNumbers?: boolean; hoistAtrules?: boolean; };
How about adding a new option named and typed the same way, define, allowing arrays? And in my code it would look like that:
define: [ ["video-width", getVideoWidth(), true], ["video-height", getVideoHeight(), true], ],
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What problem does this feature solve?
Trying to migrate from webpack to rsbuild here but stuck:
Webpack's stylus loader has the
define
option:https://webpack.js.org/loaders/stylus-loader/#stylusoptions
In my app, this enables to pass over some variables from the code to the styles which is extremely useful, such as media sizes.
If this could be added, that would be great. Thanks.
What does the proposed API look like?
Presently, rsbuild has these types under @rsbuild/plugin-stylus/dist-types/index.d.ts:
How about adding a new option named and typed the same way,
define
, allowing arrays? And in my code it would look like that:The text was updated successfully, but these errors were encountered: