Es6模块化开发出现报错 Access to script at 'file:xxx' from origin 'null' has been blocked by CORS policy origin requests are only supported for protocol schemes: http, data, chrome-extension, edge, https, chrome-untrusted.
解决方法:
Vscode中安装Live Server 插件
然后在要运行的html文件右键点击open with Live Server