✅ COMPLETED: 1. Dockerfile uses port 80 (astro preview) 2. BaseLayout imports globals.css 3. globals.css with Tailwind v4 @theme syntax 4. index.astro has Header, Footer, FixedContact 5. All image references fixed to existing files 6. Hero uses hdpe_pipe_main.jpg 7. Product cards use hdpe001.jpg 8. pt-20 on main for fixed header ✅ TESTED LOCALLY: - Build: 15 pages in 1.27s - Docker build successful - Port 80 working - Images load - CSS works Ready for Easypanel deployment.
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
import { AstroError } from "../core/errors/errors.js";
|
|
import { ActionsWithoutServerOutputError } from "../core/errors/errors-data.js";
|
|
import { viteID } from "../core/util.js";
|
|
import { ACTION_RPC_ROUTE_PATTERN, ACTIONS_TYPES_FILE, VIRTUAL_MODULE_ID } from "./consts.js";
|
|
function astroIntegrationActionsRouteHandler({
|
|
settings,
|
|
filename
|
|
}) {
|
|
return {
|
|
name: VIRTUAL_MODULE_ID,
|
|
hooks: {
|
|
async "astro:config:setup"() {
|
|
settings.injectedRoutes.push({
|
|
pattern: ACTION_RPC_ROUTE_PATTERN,
|
|
entrypoint: "astro/actions/runtime/route.js",
|
|
prerender: false,
|
|
origin: "internal"
|
|
});
|
|
},
|
|
"astro:config:done": async (params) => {
|
|
if (params.buildOutput === "static") {
|
|
const error = new AstroError(ActionsWithoutServerOutputError);
|
|
error.stack = void 0;
|
|
throw error;
|
|
}
|
|
const stringifiedActionsImport = JSON.stringify(
|
|
viteID(new URL(`./${filename}`, params.config.srcDir))
|
|
);
|
|
settings.injectedTypes.push({
|
|
filename: ACTIONS_TYPES_FILE,
|
|
content: `declare module "astro:actions" {
|
|
type Actions = typeof import(${stringifiedActionsImport})["server"];
|
|
|
|
export const actions: Actions;
|
|
}`
|
|
});
|
|
}
|
|
}
|
|
};
|
|
}
|
|
export {
|
|
astroIntegrationActionsRouteHandler as default
|
|
};
|