Skip to content
Discussion options

You must be logged in to vote

From Rsbuild core, I would not treat lib.format as stable Rsbuild config. The CommonJS switch in Rsbuild is output.module: false; for a node target, the output plugin maps that to Rspack output.library.type: 'commonjs2' here: https://github.com/web-infra-dev/rsbuild/blob/main/packages/core/src/plugins/output.ts#L131-L137. The default is also set from output.target === 'node' in init config: https://github.com/web-infra-dev/rsbuild/blob/main/packages/core/src/initConfigs.ts#L142-L145.

So for this case I would stay on the documented path:

export default {
  output: {
    target: 'node',
    module: false,
  },
  splitChunks: false,
  tools: {
    rspack: {
      output: {
        asyncChunks: 

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dhouck
Comment options

Comment options

You must be logged in to vote
1 reply
@dhouck
Comment options

Answer selected by dhouck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants