Notable changes in Rsbuild v0.7.0 #2271
Replies: 7 comments 3 replies
-
Upgrade Rspack v0.7.0Rsbuild v0.7 will upgrade the dependent Rspack v0.7.0 contains some breaking changes, see web-infra-dev/rspack#6218 for more details. |
Beta Was this translation helpful? Give feedback.
-
Sass/Less PluginsIn Rsbuild < 0.7.0, Sass and Less are supported by Starting with Rsbuild v0.7.0, And Sass
npm i @rsbuild/plugin-sass -D
import { pluginSass } from '@rsbuild/plugin-sass';
export default {
plugins: [pluginSass()],
}; Less
npm i @rsbuild/plugin-less -D
import { pluginLess } from '@rsbuild/plugin-less';
export default {
plugins: [pluginLess()],
}; |
Beta Was this translation helpful? Give feedback.
-
Use CssExtractRspackPluginFrom Rsbuild v0.7, it will use CssExtractRspackPlugin to extract CSS into separate files, rather than using This allows Rsbuild to support more CSS features, including:
|
Beta Was this translation helpful? Give feedback.
-
Add @rsbuild/plugin-typed-css-modulesAdd See: #2340 |
Beta Was this translation helpful? Give feedback.
-
Dual ESM/CJS packagesAll packages of Rsbuild now provides both CommonJS and ES module JavaScript bundles, with This allows you to use // ES module
import { createRsbuild } from '@rsbuild/core';
// CommonJS
const { createRsbuild } = require('@rsbuild/core'); |
Beta Was this translation helpful? Give feedback.
-
Remove
|
Beta Was this translation helpful? Give feedback.
-
output.dataUriLimit defaults to 4096The default value for This is because more applications are currently using HTTP2.0, so splitting assets into separate files would perform better. Meanwhile, inlining assets over 4KiB can make the JS bundle to be too large and not cache-friendly. |
Beta Was this translation helpful? Give feedback.
-
This thread is used to collect planned breaking changes and notable changes for Rsbuild v0.7.0.
Beta Was this translation helpful? Give feedback.
All reactions