-
-
Notifications
You must be signed in to change notification settings - Fork 781
Closed
Labels
bugSomething isn't workingSomething isn't workingteamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.
Description
System Info
Rspack 1.0.3
Details
In webpack, the meta param of loader can only be passed to the next loader, and the bulitin loaders in Rspack should follow the same behavior.
Example
For example, the css-loader and postcss-loader uses meta.ast to resue PostCSS AST, see:
- https://github.com/webpack-contrib/css-loader/blob/a7f5288cb9285f3309f67ce5d03b749d872d3970/src/index.js#L158
- https://github.com/webpack-contrib/postcss-loader/blob/638be98312f82e9d919bf8f5fa03a8fce8a61635/src/index.js#L103
When using Rspack's builtin:lightningcss-loader like this:
postcss-loader ---passing AST meta---> builtin:lightningcss-loader ---passing AST meta---> css-loader
The builtin:lightningcss-loader will not take any effect, because css-loader will read the AST meta from postcss-loader, and drop the transformation result of builtin:lightningcss-loader.
Reproduce link
Reproduce Steps
See web-infra-dev/rsbuild#3247 for more details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingteamThe issue/pr is created by the member of Rspack.The issue/pr is created by the member of Rspack.