https://github.com/elastic/eui/blob/58b9ca3/src/components/icon/icon.tsx#L627-L633
Here the module paths is constructed by string concatation to satisfy webpack. But vite/rollup has an opposite limitation that module paths must be constructed with template strings, otherwise there'll be a such error:
Edit: seems that I misread the rollup document, but the limitation causes this problem is the module paths do not contain a file extension. It has nothing to do with template strings.
3:12:25 AM [vite] warning:
/var/www/html/node_modules/.vite/@elastic_eui.js
47876| return;
47877| }
47878| import(
| ^
47879| /* webpackChunkName: "icon.[request]" */
47880| // It's important that we don't use a template string here, it
The above dynamic import cannot be analyzed by vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.
This results in many 404 errors in the application if it uses icons.
https://github.com/elastic/eui/blob/58b9ca3/src/components/icon/icon.tsx#L627-L633
Here the module paths is constructed by string concatation to satisfy webpack. But vite/rollup has an opposite limitation that module paths must be constructed with template strings, otherwise there'll be a such error:Edit: seems that I misread the rollup document, but the limitation causes this problem is the module paths do not contain a file extension. It has nothing to do with template strings.
This results in many
404errors in the application if it uses icons.