Complete residential site build with Docker Compose & Gitea Actions deployment
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
import type { Plugin } from 'vite';
|
||||
export declare function vitePluginAstroServerClient(): Plugin;
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { ASTRO_VITE_ENVIRONMENT_NAMES } from "../core/constants.js";
|
||||
import { patchOverlay } from "../core/errors/overlay.js";
|
||||
function vitePluginAstroServerClient() {
|
||||
return {
|
||||
name: "astro:server-client",
|
||||
applyToEnvironment(environment) {
|
||||
return environment.name === ASTRO_VITE_ENVIRONMENT_NAMES.client;
|
||||
},
|
||||
transform: {
|
||||
filter: {
|
||||
id: /vite\/dist\/client\/client\.mjs/
|
||||
},
|
||||
handler(code) {
|
||||
return patchOverlay(code);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
export {
|
||||
vitePluginAstroServerClient
|
||||
};
|
||||
Reference in New Issue
Block a user