翠 / green

Results 246 comments of 翠 / green

I think we should keep them different at least until Vite 4. I don't find any big benefits of doing this breaking change in Vite 3.x.

It's described here. https://github.com/vitejs/vite/issues/2062#issuecomment-782385406

IIUC Vite inlines CSS to realize preloading CSS by using JS chunks instead. The reason why it isn't using the `__vitePreload` seems to be because `linkElement.onload` does not work in...

I think that works for most cases but it won't for a CSS file containing relative paths (`background: url('./foo.png')`). The relative paths are relative to CSS file, but when injected...

It seems it's related to @rollup/plugin-commonjs v22. For a workaround, use Esbuild Deps Optimization at Build Time. Set `optimizeDeps.disabled = false` and `build.commonjsOptions.include = []`.

I think you forgot to set `build.commonjsOptions.include = []` which disables commonjs plugin v22 used inside Vite. https://stackblitz.com/edit/github-g2azcc?file=package.json,vite.config.ts > what is the point of using the Rollup commonjs plugin? There's...

It seems this image is not being loaded when doing `pnpm build && pnpm preview` in `playground/vue-legacy`. https://github.com/vitejs/vite/blob/4158b98c8fc30070967de1176f4b1c252d275386/playground/vue-legacy/module.vue#L9

I tested with Chrome 16 and it worked greatly. 👍 (when minify is disabled)

This implementation depends on regexs very heavily and I felt a bit fragile. So I have a suggestion, how about using [`instantiate` hook](https://github.com/systemjs/systemjs/blob/main/docs/hooks.md#instantiateurl-parenturl---promise) of SystemJS? In this way, I think...