Skip to content

Commit 78a0c55

Browse files
author
Simon
committed
docs: add babel typescript note
#521
1 parent 30f5ddc commit 78a0c55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/preprocessing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ The Babel preprocessor accepts an options object which is passed onto the babel
248248

249249
`Svelte` expects your JavaScript to be in at least ES6 format, so make sure to set your Babel configuration accordingly.
250250

251+
If you are using TypeScript through `@babel/plugin-transform-typescript`, set [onlyremovetypeimports](https://babeljs.io/docs/en/babel-preset-typescript#onlyremovetypeimports) to `true` so that all value imports are preserved.
252+
251253
_Note: If you want to transpile your app to be supported in older browsers, you must run babel from the context of your bundler._
252254

253255
### CoffeeScript

0 commit comments

Comments
 (0)