1、打包问题

  • 文件路径的配置,设置base文件路径

  • image-20230104123514646
  • noUnusedLocals和noUnusedParameters这两项分别用来检测是否有无用变量和无用参数分别设置为false,防止打包报错。

2、Content Security Policy: 升级不安全的请求“https://sph-api.atguigu.cn/admin/acl/index/login”至使用“https”

1
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

index.html文件会默认将http请求转为https,但是目标api的域为http会产生冲突。治标不治本的方式是chorm浏览器设置,允许显示不安全的网页中添加目标网址。

image-20230104123514646