for of 报错:
https://stackoverflow.com/questions/49218765/typescript-and-iterator-type-iterableiteratort-is-not-an-array-type/49221814

Cannot write file ‘xxxx’ because it would overwrite input file.:
当设置 allowJS 为true 的时候,要设置output
https://stackoverflow.com/questions/55484557/typescript-errors-in-vscode-cannot-write-file-x-because-it-would-overwrite-i

vue-cli 下 的模版中引入static 文件:

  1. <script type="text/javascript" src="<%= BASE_URL %>UE/ueditor.config.js"></script>

image.png

静态文件目录的修改

vue-cli 会将 public 中放置静态资源直接复制到 dist/目录下。
而js css 文件会打包到 dist/static 目录下,
服务器配置了 history-fallback, static为白名单,只有该目录下是返回资源。其他所有的访问都会。

由于项目中使用了第三方js, 比如 uEditor ,放在 /public/UE目录下,当打包后会自动移动到 dist/ 下

最后的打包输出结果就是 /dist/UE

但浏览器 访问 xx.com/UE/xxx 会返回 首页html。
那解决这个问题就是把UE放在 static 目录下。
于是 ,
修改 目录解构, /public/UE->/public/static/UE, 这样打包之后就是这样:
image.png