fix: esbuild build-id plugin not loading published package (#3199)
This commit is contained in:
@@ -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}";`,
|
||||
|
||||
Reference in New Issue
Block a user