> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/advanced/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/advanced/uncaught-referenceerror-exports-is-not-defined-in-filed-generated-by-typescript-ok.md).

# Uncaught ReferenceError: exports is not defined in filed generated by Typescript (ok)

https\://stackoverflow\.com/questions/42497479/uncaught-referenceerror-exports-is-not-defined-in-filed-generated-by-typescript/42510255

I solved it with a hack in the embedding HTML:

```
<script> var exports = {}; </script>
<script src="index.js"></script>
```
