output.distPath

  • Type:
type DistPathConfig = {
  root?: string;
  html?: string;
  js?: string;
  css?: string;
  svg?: string;
  font?: string;
  wasm?: string;
  image?: string;
  media?: string;
  server?: string;
  worker?: string;
  assets?: string;
};
  • Default:
const defaultDistPath = {
  root: 'dist',
  css: 'static/css',
  svg: 'static/svg',
  font: 'static/font',
  html: 'html',
  wasm: 'static/wasm',
  image: 'static/image',
  media: 'static/media',
  js: 'static/js',
  assets: 'static/assets',
};

Set the directory of the dist files. Modern.js will output files to the corresponding subdirectory according to the file type.

INFO

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - output.distPath.