问题:放在public中的文件,部署服务器访问出现404
访问www.xxxxx.com/template/xxxxx.xlsx路径报错。
发现问题:
vue.config.js中outputDir有值,所以部署在服务器应该带上它。
outputDir: 'project', // 构建时的输出目录
解决方法:
访问路径加上outputDir路径,http://www.xxxxx.com/project/template/xxxxxx.xlsx
问题:放在public中的文件,部署服务器访问出现404
访问www.xxxxx.com/template/xxxxx.xlsx路径报错。
发现问题:
vue.config.js中outputDir有值,所以部署在服务器应该带上它。
outputDir: 'project', // 构建时的输出目录
解决方法:
访问路径加上outputDir路径,http://www.xxxxx.com/project/template/xxxxxx.xlsx