Open zzddlalala opened 2 months ago
We can introduce an option to let users manually register the devtools path. WDYT? @webfansplz
We can introduce an option to let users manually register the devtools path. WDYT? @webfansplz
I agree that we can add an option to customize it.
Recently, i tried to use
devtools-next
in my SSR project, but i found the error as shown in the below picture.I found it is caused by the unnormal route
/__devtools__
. So i checked the route register, and i found it is registered with the path/demo/demo/__devtools__
, which includes twobase
stringdemo
. It is casued by these code:Besides,
devtools-next
register a the route${server.config.base}__devtools__
byserver.middlewares.
I tried to pass
base: '/'
whencreateServer()
, but it will influence the whole vite build process.So, can you remove the
server.config.base
in the__devtools__
route? just like the other vite middlewares did. And let used decide how to register it.You can refer to this demo, thanks~ https://stackblitz.com/~/github.com/zzddlalala/vitejs-vite-ghsrnu