Skip to content

Commit

Permalink
(doc) TS: add note about CommonJS
Browse files Browse the repository at this point in the history
Closes #826
  • Loading branch information
dummdidumm committed Feb 24, 2021
1 parent 02ce6d7 commit 80a63ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/preprocessors/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@ You are most likely extending from Svelte's `@tsconfig/svelte` base config in yo
```

We are looking for ways to make the `types` definition in `@tsconfig/svelte` unnecessary, so you don't have those issues in the future.

### I'm getting weird behavior when using `"module": "CommonJS"`

Don't set the module to `CommonJS`, it will result in wrong transpilation of TypeScript to JavaScript. Moreover, you shouldn't set this anyway as `CommonJS` is a module format for NodeJS which is not understood by the Browser. For more technical details, see [this issue comment](https://github.com/sveltejs/language-tools/issues/826#issuecomment-782858437).

0 comments on commit 80a63ae

Please sign in to comment.