pengbo
pengbo
> Hmm, you're right. I didn't think that esbuild could break the `\` at any position. I think some performance impact is expected, but unsure by how much. > >...
> Seems like this strategy works fine too. I think we can polish up the code a bit to no longer refer it as quotes. replace `preloadMarkerWithQuote` with `preloadMarkerRE`
> I think the idea behind the quotes was [originally](https://github.com/vitejs/vite/commit/e6f7fbad75c1b406b9a95060c5d2a42d3a8994a8) to keep the code as a valid module. Maybe we should use `import.meta.__VITE_PRELOAD__`? Do you mean that , an undefined...
> It may break if there is a plugin that is checking that all variables are properly defined. I don't know if we are respecting this in all our replacements...
> Isn't using plain `__VITE_PRELOAD__` a valid module too? It's referring to a global `__VITE_PRELOAD__` variable. We also have a [fallback](https://github.com/vitejs/vite/blob/72343bebb755fedc4ebeb915fab3afcec924f820/packages/vite/src/node/plugins/importAnalysisBuild.ts#L535-L551) that replaces any existing `__VITE_PRELOAD__`, so it should not...
@alexander-akait plz review for this
@samijaber
@samijaber