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 {
|
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}";`,
|
||||||
|
|||||||
Reference in New Issue
Block a user