For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /configure/app/experiments/source-build.md.

sourceBuild

  • Type: boolean | PluginSourceBuildOptions
  • Default: false

Used to enable the ability for source code building. When this configuration option is enabled, Modern.js will read the source code files corresponding to the source field in the sub-project's package.json and compile them.

export default {
  experiments: {
    sourceBuild: true,
  },
};

More detail can see "Source Code Build Mode"。

Options

experiments.sourceBuild is implemented based on @rsbuild/plugin-source-build. You can pass plugin options like this:

export default {
  experiments: {
    sourceBuild: {
      sourceField: 'my-source',
      resolvePriority: 'output',
    },
  },
};