#Bundler manifest option?

1 messages · Page 1 of 1 (latest)

fallen burrow
#

I was looking into the bun server components plugin and noticed that the build options used to accept a true/false value for manifest.

Looks like the manifest option is no longer available. At least not in the BuildOptions interface.

Can the bundler not generate client manifests?

real forge
#

是的,我也有相同的困扰,建议通过 BuildArtifact自行解析,对我来说这样够用了。

interface BuildOutput {
  outputs: BuildArtifact[];
  success: boolean;
  logs: Array<BuildMessage | ResolveMessage>;
}

interface BuildArtifact extends Blob {
  path: string;
  loader: Loader;
  hash?: string;
  kind: "entry-point" | "chunk" | "asset" | "sourcemap";
  sourcemap?: BuildArtifact;
}

如果 BuildArtifact 可以包含入口点的关联文件,就更好了。

为了解析到入口点包名,我在naming中配置[dir]如下:

naming: {
  entry: `[dir]/[name]-[hash].[ext]`,
  chunk: `chunks/[name]-[hash].[ext]`,
},

这样我可以解析到目录类型的入口点包名,例如:"@riophae/vue-treeselect"。

real forge