fix: esbuild build-id plugin not loading published package (#3199)

This commit is contained in:
Marvin Hagemeister
2025-08-06 17:52:34 +02:00
committed by GitHub
parent 815b1940e3
commit d14d623482
+4 -4
View File
@@ -166,15 +166,15 @@ function buildIdPlugin(buildId: string): EsbuildPlugin {
return { return {
name: "fresh-build-id", name: "fresh-build-id",
setup(build) { setup(build) {
build.onResolve({ filter: /^(jsr:)?@fresh\/build-id(@.*)?$/ }, (args) => { build.onResolve({ filter: /^(jsr:)?@fresh\/build-id/ }, (args) => {
return { return {
path: args.path, path: args.path,
namespace: "fresh-internal", namespace: "fresh-internal-build-id",
}; };
}); });
build.onLoad({ build.onLoad({
filter: /^(jsr:)?@fresh\/build-id$/, filter: /.*/,
namespace: "fresh-internal", namespace: "fresh-internal-build-id",
}, () => { }, () => {
return { return {
contents: `export const BUILD_ID = "${buildId}";`, contents: `export const BUILD_ID = "${buildId}";`,