arco design uses vite-plugin-style-import to load menu-item on demand and reports an error css not found
Contents
According to the official arco design tutorial:
Manually import components on demand
Solution:
Modify the official website example as follows, the exclude array contains the names of components without CSS. If you are not sure about the component names, you can print them in the resolveStyle
function using console.log
.
1 | createStyleImportPlugin({ |
Error message:
1 | [vite] Internal server error: Failed to resolve import "D:/Programing/WebstormProjects/cow-Low-code/node_modules/@arco-design/web-vue/es/menu-item/style/css.js" from "src\views\HomeView.vue". Does the file exist? |