Skip to content

Commit

Permalink
Documenting workaround for #108
Browse files Browse the repository at this point in the history
  • Loading branch information
ezolenko committed May 10, 2019
1 parent 1fa02cd commit 28ae2cc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,27 @@ See explanation for `rollupCommonJSResolveHack` option below.

See `objectHashIgnoreUnknownHack` below.

#### rollup-plugin-babel

This plugin transpiles code, but doesn't change file extension. Babel plugin, even though it claims it processes all files, only looks at code with those extensions by default: `.js,.jsx,.es6,.es,.mjs`. To workaround add `ts` and `tsx` to the list of babel extensions.

```js
...
import { DEFAULT_EXTENSIONS } from '@babel/core';
...
babel({
extensions: [
...DEFAULT_EXTENSIONS,
'ts',
'tsx'
],
runtimeHelpers: true
}),
...
```

See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108)

### Plugin options

* `tsconfigDefaults`: `{}`
Expand Down

0 comments on commit 28ae2cc

Please sign in to comment.