Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atfzl/ts-transform-jsx-source

Adds source file, line number and column number to JSX elements
https://github.com/atfzl/ts-transform-jsx-source

jsx typescript typescript-plugin typescript-transformer

Last synced: 25 days ago
JSON representation

Adds source file, line number and column number to JSX elements

Awesome Lists containing this project

README

        

# ts-transform-jsx-source

Adds source file, line number and column number to JSX elements.

## Example

In

```js
foo
```

Out

```js

foo

```

## Installation

```
yarn add -D ts-transform-jsx-source
```

## Usage

#### Webpack

```js
import tsTranformJsxSource from 'ts-transform-jsx-source';

// ...
{
loader: "awesome-typescript-loader",
options: {
getCustomTransformers: () => ({ before: [tsTranformJsxSource] })
}
}
// ...
```

#### Fusebox

```js
import tsTranformJsxSource from 'ts-transform-jsx-source';

const fuse = FuseBox.init({
homeDir: 'src/',
target: 'browser@es6',
output: 'dist/$name.js',
transformers: {
before: [tsTranformJsxSource],
},
});
```