You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports={module: {rules: [{test: /\.less$/i,use: ["style-loader","css-loader",{loader: "less-loader",options: {additionalData: async(content,loaderContext)=>{// More information about available properties https://webpack.js.org/api/loaders/const{ resourcePath, rootContext }=loaderContext;constrelativePath=path.relative(rootContext,resourcePath);if(relativePath==="styles/foo.less"){return"@value: 100px;"+content;}return"@value: 200px;"+content;},},},],},],},};
What problem does this feature solve?
当前定义:
rsbuild/packages/shared/src/types/thirdParty.ts
Lines 41 to 46 in 132735b
less-loader 文档示例:
less-loader 代码:
https://github.com/webpack-contrib/less-loader/blob/c4928a3ffbb523e97822e6ed955a04b658164d0c/src/index.js#L50
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: