output.distPath

  • 类型:
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;
};
  • 默认值:
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',
};

设置构建产物的输出目录,Modern.js 会根据产物的类型输出到对应的子目录下。

INFO

该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 Rsbuild - output.distPath