string[]>= 1.5.7Specifies the condition names used to match entry points in the exports field of a package.
The value of resolve.conditionNames overrides the default value of Rsbuild:
export default {
resolve: {
conditionNames: ['require', 'node'],
},
};resolve.conditionNames is provided by Rspack, see Rspack - resolve.conditionNames.
You can also configure it using tools.rspack:
export default {
tools: {
rspack: {
resolve: {
conditionNames: ['custom'],
},
},
},
};The difference between them is how the configuration is merged.
tools.rspack merges the configuration arrays based on webpack-merge, which means tools.rspack.resolve.conditionNames will merge with the default value of Rsbuild, rather than overriding it.