About the problem that the Ant-Design-Pro-Vue project cannot be previewed after packaging.
The packaged dist folder
Open index.html
and it is always in the loading state
. Since the official does not clearly explain the configuration and deployment after packaging, beginners think that they can preview it by opening index.html. To preview the
packaged project, you need to deploy it on the server.
However, the back-end is generally responsible for the server. Of course, the front-end can also build a
local service based on node.js+express.
For details, please refer to the article https://blog.csdn.net/weixin_43835425/article/details /103101571
Download the Express template.
Copy the contents of the packaged dist folder to the public folder.
Execute npm start in the Express folder
to open the port number http://localhost:3000.
Preview successful