message: fix(bundler-webpack): mfsu cache deps undefined
diff: @@ -27,6 +27,15 @@ type IOpts = {
  entry: Record<string, string>;
  } & Pick<IConfigOpts, 'cache'>;
  +export function stripUndefined(obj: any) {
  + Object.keys(obj).forEach((key) => {
  + if (obj[key] === undefined) {
  + delete obj[key];
  + }
  + });
  + return obj;
  +}
  +
  export async function dev(opts: IOpts) {
  const enableMFSU = opts.config.mfsu !== false;
  let mfsu: MFSU | null = null;
  @@ -49,15 +58,15 @@ export async function dev(opts: IOpts) {
  join(opts.cwd, 'node_modules/.cache/mfsu'),
  onMFSUProgress: opts.onMFSUProgress,
  getCacheDependency() {
  - return {
  + return stripUndefined({
  version: require('../package.json').version,
  esbuildMode: !!opts.config.mfsu?.esbuild,
  alias: opts.config.alias,
  externals: opts.config.externals,
  theme: opts.config.theme,
  - runtimePublicPath: !!opts.config.runtimePublicPath,
  + runtimePublicPath: opts.config.runtimePublicPath,
  publicPath: opts.config.publicPath,
  - };
  + });
  },
  });
  }
  