router/index.js 里写的是 '../views/Login.vue',但磁盘上的实际文件名是全小写的 login.vue。Windows 文件系统不区分大小写,所以本地 npm run build 一直能过; 一旦在 Linux / Docker / CI 上构建就会直接报 Could not resolve,属于典型的 “本机好使、上线就炸”的定时炸弹。 已用精确字符串比对(而非 fs.exists,后者在 Windows 上大小写不敏感、测不出来) 扫描了 src 下全部 import,确认只有这一处不匹配。
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.