#pass flags to node via vite command

1 messages · Page 1 of 1 (latest)

valid stone
#

If I want to start vite via an inspectable node instance for debugging purposes, is there an elegant way to do it?
Currently doing it via:

scripts: {
  "debug": "node --inspect-brk ./node_modules/.bin/vite dev",
}

But there sure is a more elegant way to do it..?

scripts: {
  "debug": "vite --inspect-brk dev",
}

or

scripts: {
  "debug": "vite dev -- --inspect-brk",
}

sadly don't work

#

Vitest seems to have a --inspect-brk flag that you can pass it for reference