Rollup failed to resolve import "/@/api/XXX" from "src/XXX.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
pinia默认安装的是vue 2.6版本,
需要 npm install vue@3.2.31 --force
博客内容讲述了在使用Rollup构建Vue项目时遇到的模块解析问题,具体表现为无法解析`@/api/XXX`。这通常是因为Vue版本不匹配导致的。解决方案是将默认的Vue2.6更新为Vue3.2.31,通过`npm install vue@3.2.31 --force`强制安装。此外,还提到了如果确实需要外部化该模块,可以将其添加到`build.rollupOptions.external`配置中。
2889





