How can we distinguish beteen webpack.compiler and Rspack.compiler? #2640
-
As we known, the Rspack is progressively aligning webpack plugin api. apply(compiler) {
if(isRspack) {
// doSomethingWithRspack
} else if(isWebpack) {
// doSomethingWithWebpack
}
} So in the plugin we need distinguish the bundler. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
rspackVersion
is supposed to be a stable field with different version for each release. So I will recommend to use this field.