-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Empty exports #44040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
When you type |
yea, of course, but I use imports only for types and interfaces, so none of my files intend to be modules |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Bug Report
π Search Terms
prevent empty exports {} Object.defineProperty(exports, "__esModule", { value: true });
π Version & Regression Information
β― Playground Link
Playground link with relevant code, change typescript version between 3.9.4 and 4+
π» Code
π Actual behavior
π Expected behavior
Hello, I have some problems when typescript generates empty exports in each file by itself. I use TS compiler to generate files that will be executed by eval. When eval happens I get an error because of exports.
In typescript config, we have the option "isolatedModules", which could do this part of the functionality.
Anyway, how can I get rid of any kind of exports in complied files? I hope you can help me because these exports force me to call string.replace() before executing the files!
The text was updated successfully, but these errors were encountered: