systemjs / systemjs

Dynamic ES module loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logging for SystemJS Error#3

Aaron-Zhao-Asurion opened this issue · comments

  • SystemJS Version:
  • Which library are you using?
    • [ x] system.js
    • s.js
    • system-node.cjs
  • Which extras are you using?
    • AMD extra
    • Named Exports
    • Named Register
    • Transform
    • Use Default
    • Global
    • Dynamic Import Maps
  • Are you using any custom hooks?

Question

In SystemJS Error#3, one type of cause is The javascript file was successfully downloaded, but failed during initial, top-level, execution, is there a way to catch that error in JavaScript? I am trying to get the error message and log it to the backend, right now it only shows up in user's browser console and no trace from the backend.

This is coming from system js importing a react build bundle file for single spa.

https://github.com/systemjs/systemjs/blob/main/docs/errors.md#3