Closed lubomirblazekcz closed 2 years ago
Also sort of related to https://github.com/vitejs/vite/issues/2483 when importmaps or es-module-shims are used __vite__injectQuery
causes problems here.
Vite should ignore https:// and imports that are handled by importmaps and don't do any modifications to it.
You can suppress the warning with:
const lang = await import(/* @vite-ignore */ `https://cdn.esm.sh/v41/vanillajs-datepicker/locales/${document.documentElement.lang === "en" ? "cs" : document.documentElement.lang}.js`);
as suggested in the warning message.
Vite does a simple regex pass to try to capture the import string, so it can't know that the import string starts with http
in the first place to be skipping it. The warning message is emitted when the regex fails.
Describe the bug
Reproduction
Before submitting the issue, please make sure you do the following