Expected behavior:
Both single quoted import x from 'y'; and double-quoted import x from "y"; imports should be remapped to localhost.
Observed behaviour:
Only single quoted import statements get remapped, double-quoted statements get ignored - often meaning that they reach out to esm.sh servers and download (so its hard to notice that its not actually served locally since the code still runs like normal).
Reproduction case:
// index.ts
import React from "https://esm.sh/react@18.2.0";
import React2 from 'https://esm.sh/react@18.2.0';
console.log(React);
console.log(React2);
// vite.config.mts
import { defineConfig } from 'npm:vite@3.2.4';
import denoResolve from 'https://deno.land/x/vite_plugin_deno_resolve/mod.ts';
export default defineConfig({
plugins: [denoResolve()],
});
Here you can see Vite reaching out to both localhost & esm.sh to resolve React & React2.

Expected behavior:
Both single quoted
import x from 'y';and double-quotedimport x from "y";imports should be remapped to localhost.Observed behaviour:
Only single quoted import statements get remapped, double-quoted statements get ignored - often meaning that they reach out to esm.sh servers and download (so its hard to notice that its not actually served locally since the code still runs like normal).
Reproduction case:
Here you can see Vite reaching out to both localhost & esm.sh to resolve React & React2.