Vite集成Elastic UI时动态导入EuiIcon图标失败求助
EuiIcon组件无法渲染shard/bullseye图标,动态导入模块失败
仓库信息
- 仓库地址:
https://github.com/rorymcd98/spot-the-image-gen
安装与运行步骤
- 安装依赖:
yarn install - 启动开发服务器:
yarn dev
问题详情
在./src/components/Counters.tsx中使用Elastic UI的EuiIcon组件时遇到异常:尝试导入shard和bullseye类型的图标,图标无法正常渲染,同时开发控制台抛出以下错误:
caught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:5174/node_modules/.vite/deps/assets/bullseye?import
我已尝试将对应图标文件放置在public/assets/{name}.svg路径下,但问题仍未解决,希望有人能查看仓库代码定位问题,谢谢!
内容的提问来源于stack exchange,提问作者Rory McDonald
相关产品推荐
相关产品推荐

