1. Cause
- Static pages such as the login page and the home page can be entered normally, and the back-end access is also normal, and the verification code can be obtained.
- Dynamic page: system management -> user management, role management, etc. The address configured in the menu management can be accessed locally, but after deployment, it prompts Error: Cannot find module '@/views/xxx'
2. Analysis
Reference: https://blog.csdn.net/qq_40147863/article/details/121727997
Simply put, it's a webpack version issue
3. Positioning
src/permission.js file
The loadView method is used to load dynamic pages
4. Solve
Change the loadView method to the following code and redeploy it to use