# atma-loader-stacktrace

> Stacktraces for compiled/minified scripts

Latest version **0.1.1** (published 2014-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install atma-loader-stacktrace
pnpm add atma-loader-stacktrace
yarn add atma-loader-stacktrace
bun add atma-loader-stacktrace
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-07-07 |
| First published | 2014-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex Kit |
| Maintainers | tenbits |
| Keywords | stacktrace |

## Links

- npm: https://www.npmjs.com/package/atma-loader-stacktrace
- Repository: https://github.com/atmajs/atma-loader-stacktrace
- Issues: https://github.com/atmajs/atma-loader-stacktrace/issues
- npm.io page: https://npm.io/package/atma-loader-stacktrace

## Dependencies (1)

- [source-map-support](https://npm.io/package/source-map-support.md) >0.0.0

## Recent versions

- 0.1.1 (latest) — 2014-07-07
- 0.1.0 — 2014-06-26

## README

### Stacktraces for compiled and minified files

Use correct linenumber and filenames in errors for better debugging.

##### Usage
```bash
$ npm i atma-loader-stacktrace -s
# not already included `atma-io`? Then:
$ npm i atma-io -s
```
```javascript
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](https://github.com/atmajs/atma-loader-traceur).
```
lib/
	foo.es6
```

`atma-loader` uses [atma-io](https://github.com/atmajs/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

---
_Source: https://npm.io/package/atma-loader-stacktrace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
