相关文章推荐
想发财的遥控器  ·  The Best Security ...·  2 月前    · 
激动的警车  ·  Changing how shaders ...·  2 月前    · 
卖萌的黄豆  ·  Git - Rebasing·  2 月前    · 
直爽的匕首  ·  Getting the tab key ...·  2 月前    · 
文质彬彬的红豆  ·  Power BI ...·  4 月前    · 
逆袭的灭火器  ·  python - TypeError: ...·  2 年前    · 
精彩文章免费看

VUE部署报We're sorry but duty doesn't work properly without JavaScript enabled.

本地运行正常,部署到服务上,访问页面一片空白,开发者模式查看,发现报

<noscript>
"<strong>We're sorry but duty doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>"
</noscript>

经百度,最简单的处理方法是在vue.config.js里配置如下

publicPath: './',

vue.config.js的完整配置如下

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

配置完成后,页面访问正常!!!