What problem does this feature solve?
My company, Canva, currently has an expensive Babel loader with many custom Babel plugins. These plugins only need to run against a subset of source code and so we have a quick check on the JS side which acts as a pass through for files which do NOT need to be babel transformed.
Being able to move this check to the Rust side would speed things up as we avoid message passing back and worth between the Rust and JS side.
What does the proposed API of configuration look like?
open to suggestions but something like rules[].contentInclude
type ContentInclude = Array<{
id: string;
condition: Condition;
}>
If one or more conditions match the loader is invoked. If a loader is invoked the ids of the matching conditions are passed to it so it can make decisions based on them.
https://rspack.rs/config/module-rules#condition
What problem does this feature solve?
My company, Canva, currently has an expensive Babel loader with many custom Babel plugins. These plugins only need to run against a subset of source code and so we have a quick check on the JS side which acts as a pass through for files which do NOT need to be babel transformed.
Being able to move this check to the Rust side would speed things up as we avoid message passing back and worth between the Rust and JS side.
What does the proposed API of configuration look like?
open to suggestions but something like
rules[].contentIncludeIf one or more conditions match the loader is invoked. If a loader is invoked the ids of the matching conditions are passed to it so it can make decisions based on them.
https://rspack.rs/config/module-rules#condition