本地模块开发跨域解决办法

问题

Access to script at 'file:///C:/Users/limakilo0000/OneDrive/limakilo2020.github.io/app.js'
from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, edge, https, chrome-untrusted.

vscode中安装live server插件

右键open with live server

posted @ 2021-08-01 20:06  贾正直  阅读(112)  评论(0)    收藏  举报