Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 441 Bytes

File metadata and controls

33 lines (21 loc) · 441 Bytes

The Script error

关于静态资源跨域导致的 js 异常捕捉上报失败的问题

Problem

  • Serve static Resources
$ npm run cdn
  • Serve website
$ npm start

此时,访问 http://127.0.0.1:3000,页面上报 js 异常时,将发生 Script error 问题

Solution (CORS)

  • Serve static Resources
$ CORS=1 npm run cdn
  • Serve website
$ CROSSORIGIN=1 npm start