Breaking changes in Rsbuild v0.4.0 #1420
Replies: 4 comments 4 replies
-
JavaScript APIThe import { loadConfig } from '@rsbuild/core';
// v0.3
const config = await loadConfig();
// v0.4
const { content, filePath } = await loadConfig(); |
Beta Was this translation helpful? Give feedback.
-
Plugin ReactRemoved default Configurations related to the UI library should be provided in the UI library-specific plugins, such as
// rsbuild.config.ts
export default {
source: {
transformImport: [
{
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
},
],
},
};
// rsbuild.config.ts
export default {
source: {
transformImport: [
{
libraryName: '@arco-design/web-react',
libraryDirectory: 'es',
camelToDashComponentName: false,
style: true,
},
{
libraryName: '@arco-design/web-react/icon',
libraryDirectory: 'react-icon',
camelToDashComponentName: false,
},
],
},
}; |
Beta Was this translation helpful? Give feedback.
-
Rsbuild Configoutput.disableFilenameHashRename
type FilenameHash = boolean;
export default {
output: {
disableFilenameHash: true,
}
};
export default {
output: {
filenameHash: false,
}
}; |
Beta Was this translation helpful? Give feedback.
-
Builtin PostCSS PluginsRsbuild v0.4.0 will remove the builtin postcss-flexbugs-fixes plugin. This plugin is used to fix some flexbug's issues for IE 10 & 11. Considering that modern browsers no longer have these flex issues, we can remove this plugin to improve build performance. If your project needs to be compatible with IE 10 & 11 and encounters these flex issues, you can manually add this plugin in Rsbuild:
npm add postcss-flexbugs-fixes -D
module.exports = {
'postcss-flexbugs-fixes': {},
}; |
Beta Was this translation helpful? Give feedback.
-
This thread is used to collect planned breaking changes for Rsbuild v0.4.0.
Beta Was this translation helpful? Give feedback.
All reactions