Skip to content

Commit 28ae2cc

Browse files
authored
Documenting workaround for #108
1 parent 1fa02cd commit 28ae2cc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ See explanation for `rollupCommonJSResolveHack` option below.
6868

6969
See `objectHashIgnoreUnknownHack` below.
7070

71+
#### rollup-plugin-babel
72+
73+
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.
74+
75+
```js
76+
...
77+
import { DEFAULT_EXTENSIONS } from '@babel/core';
78+
...
79+
babel({
80+
extensions: [
81+
...DEFAULT_EXTENSIONS,
82+
'ts',
83+
'tsx'
84+
],
85+
runtimeHelpers: true
86+
}),
87+
...
88+
```
89+
90+
See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108)
91+
7192
### Plugin options
7293

7394
* `tsconfigDefaults`: `{}`

0 commit comments

Comments
 (0)