JSPM

atma-loader-stacktrace

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q50207F
  • License MIT

Stacktraces for compiled/minified scripts

Package Exports

  • atma-loader-stacktrace

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (atma-loader-stacktrace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Stacktraces for compiled and minified files

Use correct linenumber and filenames in errors for better debugging.

Usage
$ npm i atma-loader-stacktrace -s
# not already included `atma-io`? Then:
$ npm i atma-io -s
require('atma-loader-stacktrace')({
    //@default false
    handleUncaughtExceptions: true
});

// after this line of code all error objects will have original filenames, linenumbers
Minified files
lib/
   foo.js
   foo.min.js
   foo.min.js.map

Now you can require('./lib/foo.min.js') and on errors you will see the normalized path to foo.js with proper line numbers. Any time the error occure this library will pick up the source maps (if exists *.map)

Compiled files

As for example, refer to atma-loader-traceur.

lib/
    foo.es6

atma-loader uses atma-io to load and dynamicaly compile the sources. And this library registers virtual files with the extension e.g. *.es6.map, so now after an error occures it will load the sourcemaps for the foo.es6 file and correctly replace the linenumber for better debuggin.


(c) MIT