feat: add vite plugin (#3187)

Second attempt after we had to revert
https://github.com/denoland/fresh/pull/3185
This commit is contained in:
Marvin Hagemeister
2025-08-06 12:13:22 +02:00
committed by GitHub
parent a5205b2a8e
commit 36aa9b5639
55 changed files with 2303 additions and 285 deletions
+2 -2
View File
@@ -166,14 +166,14 @@ function buildIdPlugin(buildId: string): EsbuildPlugin {
return {
name: "fresh-build-id",
setup(build) {
build.onResolve({ filter: /[/\\]+build_id\.ts$/ }, (args) => {
build.onResolve({ filter: /^fresh\/build-id$/ }, (args) => {
return {
path: args.path,
namespace: "fresh-internal",
};
});
build.onLoad({
filter: /[/\\]build_id\.ts$/,
filter: /^fresh\/build-id$/,
namespace: "fresh-internal",
}, () => {
return {