You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to use https://github.com/russss/vite-plugin-render-svg within my vite config import { manifest } from 'virtual:render-svg'; to dynamically pass along image names, the build process throws an error:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'virtual:'
failed to load config from /home/xian/tech/gits/zabbix-vue/vite.config.js
error during build:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'virtual:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:208:11)
at defaultLoad (node:internal/modules/esm/load:103:3)
at ModuleLoader.load (node:internal/modules/esm/loader:739:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:519:43)
at #createModuleJob (node:internal/modules/esm/loader:543:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:312:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:280:41)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Vite config itself cannot be processed by Vite plugins since that's where plugins are defined, so virtual:render-svg does't work there. See also https://vite.dev/config.
By default, Vite uses esbuild to bundle the config into a temporary file and load it.
Describe the bug
If I try to use https://github.com/russss/vite-plugin-render-svg within my vite config
import { manifest } from 'virtual:render-svg';
to dynamically pass along image names, the build process throws an error:Any ideas?
Thanks!
Reproduction
https://github.com/mchugh19/zabbix-vue/tree/mv3-2
Steps to reproduce
vite build
where vite.config.js containsimport { manifest } from 'virtual:render-svg';
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: