翠 / green

Results 246 comments of 翠 / green

I reran nuxt but it failed again. It seems this PR does affect nuxt and astro. 🤔

@bluwy Would you take a look why this breaks astro?

It seems docker v26 started to return `::1` for `localhost` even if the host only uses IPv4. https://github.com/moby/moby/releases/tag/v26.0.0#:~:text=Always%20attempt%20to,include%20IPv6%20entries So in the container Vite listens on `::1` (because `localhost` resolves to...

Thanks for creating this. The reason why this is happening is explained in #7651: > ## Current Vite's implementation > It is implemented by [this `rebaseUrls` function](https://github.com/vitejs/vite/blob/09c4fc01a83b84f77b7292abcfe7500f0e948db6/packages/vite/src/node/plugins/css.ts#L1303-L1365). This function is...

> Sourcemaps are required to resolve relative URLs in SASS imports. Would you expand this a bit more? IIRC Vite does not rely on sourcemaps when resolving relative URLs in...

So..., you are going to write our own postcss-plugin like what resolve-url-loader does? Won't that result in rebasing the URL twice as [Vite has a built-in feature for that](https://vitejs.dev/guide/features.html#css-pre-processors:~:text=Vite%20improves%20%40import%20resolving%20for%20Sass%20and%20Less%20so%20that%20Vite%20aliases%20are%20also%20respected.%20In%20addition%2C%20relative%20url()%20references%20inside%20imported%20Sass/Less%20files%20that%20are%20in%20different%20directories%20from%20the%20root%20file%20are%20also%20automatically%20rebased%20to%20ensure%20correctness.) and...

This is not something specific to Vite and happens with Webpack, too. https://mitchgavan.com/code-splitting-react-safely/ http://dimaip.github.io/2020/04/25/deploying-apps-with-code-splitting/ I don't have any idea to solve this on a bundler side.