Bjorn Lu

Results 767 comments of Bjorn Lu

Thanks for the example @jimboHenris. It looks like you need to install `@babel/plugin-syntax-import-assertions` and adjust the vite config to: ```js export default defineConfig({ plugins: [ react({ babel: { plugins: ['@babel/plugin-syntax-import-assertions'],...

Been thinking about this, and I wonder what it really takes to "support import assertions". On one hand, Vite can preserve the import assertions as is, and return the correct...

I just tried a dependency that uses import assertions and it worked for me, provided that it's being optimized by esbuild. If it's excluded from optimization via `optimizeDeps.exclude` (e.g. a...

I submitted https://github.com/vitejs/vite/pull/8937 to apply the strip approach, which essentially removes the `assert { type: "json" }` part so it'll use Vite's default JSON handling. I've added notes in the...

It was fixed when Vite beta was prebundling in build too, but now it's not. You can bring it back by specifying `optimizeDeps.disabled: false` but note that it's experimental though....

That means we will be discussing about this in the next team meeting (if we have the time) 😄 I'd like to review this PR myself too, but we'll have...

It's hard to "take action" on this issue as it's mostly an issue with Vite's behaviour and Docker not playing well together. It may be better to document the solutions...

It seems to take 2.2s to prebundle for me according to the logs. (macos m1) And according to the logs given, looks like each vite resolve is taking around 100-2000ms...

Wouldn't using something like `esbuild-register` pollutes the entire nodejs process? e.g. it would affect Vite SSR too which may bring a slight perf penalty, or perhaps inconsistency. Otherwise we'd need...