rspack
rspack copied to clipboard
[Feature]: DefinePlugin support `__webpack_layer__`
What problem does this feature solve?
Webpack supports __webpack_layer__
and it will be replaced with the value of entry.layer
. But now Rspack doesn't support it.
What does the proposed API of configuration look like?
// webpack.config.js
module.exports = {
entry: {
catalog: {
import: './catalog.js',
layer: 'main'
}
},
plugins: [
new rspack.DefinePlugin({
__RUNTIME_TYPE__: '__webpack_layer__'
})
]
}