使用npm run build后 打开dist文件夹的index.html文件空白
控制台显示很多文件未找到的报错
在vue.config.js中添加:publicPath: './',
如下
const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
transpileDependencies: true,
publicPath: './',
});
使用npm run build后 打开dist文件夹的index.html文件空白
控制台显示很多文件未找到的报错
在vue.config.js中添加:publicPath: './',
如下
const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
transpileDependencies: true,
publicPath: './',
});