翠 / green

Results 246 comments of 翠 / green

I think it doesn't. I guess we can append `'use strict'` in `ssrTransformScript`. But I'm not sure if we can introduce that change in a minor version bump. related: https://github.com/vitejs/vite/pull/9199#discussion_r924277446

This is similar to #8427. `new Worker(new URL('./foo.js', import.meta.url))` is not supported by the dep optimizer. A workaround is to set `optimizeDeps.exclude: ['three-gpu-pathtracer']`.

Yeah, we should probably have a document that explains dep-optimizer doesn't support every feature on the features page. IIUC this is just not implemented.

It seems this is happening because Vite transpiles TS to JS (ESNext) first and then transpiles to lower target. There's a inconsistency in TypeScript with different target: https://github.com/microsoft/TypeScript/issues/45995, https://github.com/microsoft/TypeScript/issues/50971 ```ts...

I mean Vite first transpiles your TS code to JS with `target: 'esnext'`. It's not configurable. The only workaround I can think of is to move the assignment inside the...

I'll convert to draft as the tests are failing.

@caoxiemeihao I reran the CI. It failed again. I don't think it's a flaky fail. Perhaps you forgot to run `pnpm build` before running `pnpm test`.