• Type: boolean | PluginSourceBuildOptions
  • Default: false
  • Version: 2.46.0

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',
    },
  },
};
ON THIS PAGE