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 {
name: "fresh-build-id",
setup(build) {
build.onResolve({ filter: /^(jsr:)?@fresh\/build-id(@.*)?$/ }, (args) => {
build.onResolve({ filter: /^(jsr:)?@fresh\/build-id/ }, (args) => {
return {
path: args.path,
namespace: "fresh-internal",
namespace: "fresh-internal-build-id",
};
});
build.onLoad({
filter: /^(jsr:)?@fresh\/build-id$/,
namespace: "fresh-internal",
filter: /.*/,
namespace: "fresh-internal-build-id",
}, () => {
return {
contents: `export const BUILD_ID = "${buildId}";`,