mirror of
https://github.com/ezolenko/rollup-plugin-typescript2.git
synced 2025-12-08 19:06:16 +00:00
Documenting workaround for #108
This commit is contained in:
parent
1fa02cd89e
commit
28ae2ccff7
21
README.md
21
README.md
@ -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`: `{}`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user