Bjorn Lu

Results 349 comments of Bjorn Lu

Likely a regression from https://github.com/vitejs/vite/pull/9140. We're bundling the Vite config and all the related files, but because the relative imports point to a file from a package that could have...

I've been thinking about this and it's quite tricky in general to support this. It's either: 1. We rewrite the import paths for files in a different package. 2. Or...

This PR currently reorders `script type-"module"` only if an `importmap` exist, so other cases it should work like before. Also happy to try out the alternative though.

Updated to use a Vite plugin with `transformIndexHtml` to move the importmap instead. I didn't add a warning though as I think there are cases where someone has no control...

Yeah I think that could be something that we can warn by default. Would have to warn before any `transfromIndexHtml` happens 🤔 I'll see if I can add that tomorrow.

The websocket is used for more than HMR as explained at https://github.com/vitejs/vite/issues/6315#issuecomment-1166558944. Disabling it completely would disable the other features too. Maybe we can allow that, but it would be...

It's likely on this line that we didn't take into account of this specific case. https://github.com/vitejs/vite/blob/1c1cf43c146b4f48cb730a33b9bfd13946263132/packages/vite/src/node/optimizer/index.ts#L914-L918 Or the other possibility is that esbuild doesn't correctly return the `output` after bundling....

What Vite version are you using? This should be fixed in latest wit https://github.com/vitejs/vite/pull/9315. Otherwise your code may be using `?.` optional chaining which Vite doesn't transpile by default if...

I'm not sure if an issue in yarn3 justifies changing how Vite loads `vite.config.ts`. We can't easily use the transform API since we have to bundle all relative imports as...