Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vike / Breakpoint position wrong #118

Closed
aheissenberger opened this issue Aug 20, 2024 · 1 comment
Closed

Vike / Breakpoint position wrong #118

aheissenberger opened this issue Aug 20, 2024 · 1 comment

Comments

@aheissenberger
Copy link

vavite serve in the vscode Javascript Debug Terminal will break to a different position im Code somewhere after the set breakpoint.

Setup:

  • vavite: 4.1.2
  • vite: 5.4.1
  • vike: 0.4.188
  • Hono: 4.5.6

vite.config.ts:

import { vavite } from "vavite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import vike from "vike/plugin";

export default defineConfig({
  plugins: [
    vike({disableAutoFullBuild: true}),
    react({}),
    vavite({
      handlerEntry: "/hono-entry.vavite.ts",
      serveClientAssetsInDev: true,
      standalone: false,
    }),
  ],
});
@cyco130
Copy link
Owner

cyco130 commented Sep 7, 2024

Unfortunately this is a long standing issue with Vite's SSR dev server. The best fix I have used to be the @vavite/node-loader package but it only works on Node 18.

You might want to try adding the experimental useViteRuntime: true option to your vavite config. It's supposed to solve this problem but I'm not 100% sure.

Hopefully the upcoming Vite Environment API will finally fix this.

@cyco130 cyco130 closed this as completed Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants