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

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



I solved it with a hack in the embedding HTML:

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