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

Misplaced breakpoints after ssrLoadModule #7487

Closed
7 tasks done
GauBen opened this issue Mar 27, 2022 · 1 comment
Closed
7 tasks done

Misplaced breakpoints after ssrLoadModule #7487

GauBen opened this issue Mar 27, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@GauBen
Copy link
Contributor

GauBen commented Mar 27, 2022

Describe the bug

Hello there, I have a bug in a very exotic setup.

I'm running a nest application in vite with vite-plugin-node. Everything works fine for my needs, except debugging.

Let's consider the file accounts.controller.ts, with a breakpoint on line 11:

image

When transpiled to TypeScript, the corresponding line is line 22:

image

However, ssrLoadModule produces a slightly different virtual file:

image

As you can see here, the breakpoint triggers on line 22 (in fact 23) and not on the right line.

Might be related to #5834.

I tried patching vite-plugin-node/server/index.ts with the following line without success.

const appModule = await server.ssrLoadModule(config.appPath, {fixStacktrace: true});

Reproduction

https://git.inpt.fr/inp-net/bonfire/-/tree/vite-issue/

System Info

vite: 2.8.6
vite-plugin-node: 0.0.18
yarn: 3.2.0 (with node_modules)

Used Package Manager

yarn

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #3288

@sapphi-red sapphi-red marked this as a duplicate of #3288 Jan 24, 2023
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage feat: ssr labels Jan 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants