[VUE] Static resource path error after Vue project build

After using npm run build, the index.html file in the dist folder is blank

The console shows many file not found errors

Add in vue.config.js: publicPath: './',

as follows

const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
	transpileDependencies: true,
	publicPath: './',
});

Guess you like

Origin blog.csdn.net/liusuihong919520/article/details/132674507