Skip to content

wangdahoo/script-error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published