Skip to content

Commit

Permalink
fix: skip transform for vite-imagetools
Browse files Browse the repository at this point in the history
  • Loading branch information
brenelz committed Dec 29, 2023
1 parent 06700ab commit 89d300b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vinxi/lib/router-modes.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ const routerModes = {
const { createViteHandler } = await import("./dev-server.js");
const viteServer = await createViteHandler(router, app, serveConfig);
const handler = eventHandler(async (event) => {
const originalURL = event.node.req.url;
let base = join(app.config.server.baseURL ?? "/", router.base);
// @ts-expect-error _skip_transform is a private property
event.node.req._skip_transform = !originalURL.startsWith(base);

const { default: handler } = await viteServer.ssrLoadModule(
handlerModule(router),
);
Expand Down

0 comments on commit 89d300b

Please sign in to comment.