首页 > 系统相关 >vite 打包vue3项目 nginx配置访问 生成dist文件夹文件

vite 打包vue3项目 nginx配置访问 生成dist文件夹文件

时间:2023-02-27 17:13:49浏览次数:56  
标签:dist script module nginx MIME vue3 vite

其中一个是,vite 项目 执行 “vite build” 并部署上线后,在浏览器中访问就会有以下关于路由的奇怪问题:

我们用嵌套路由开发的页面生成的路径,个别菜单在初次加载、或者二次刷新加载时,都会报错如:Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

标签:dist,script,module,nginx,MIME,vue3,vite
From: https://www.cnblogs.com/pansidong/p/17160423.html

相关文章