Skip to content
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

Is esModuleInterop: true needed in tsconfig? #1674

Open
vzarskus opened this issue Dec 11, 2023 · 0 comments
Open

Is esModuleInterop: true needed in tsconfig? #1674

vzarskus opened this issue Dec 11, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@vzarskus
Copy link

vzarskus commented Dec 11, 2023

🗄️ Docs report

Description

In https://scully.io/docs/learn/getting-started/manualInstallation/ page it is shown that we should set "esModuleInterop": true for Scully plugins tsconfig.json.
As far as I understand, this flag is used to address some possible issues when importing CommonJS modules to ES6 modules https://www.typescriptlang.org/tsconfig#esModuleInterop.
The manual installation docs also state that we should set "module": "commonjs" which means that all the TS code will be compiled to JS that uses CommonJS module system. Thus, if we are supposed to compile to CommonJS, why do we need to also set "esModuleInterop": true?

I am submitting this issue because I would like to make sure that turning off esModuleInterop will not break anything or result in some unexpected behavior from Scully. We recently had a subtle bug related to module imports and turning off esModuleInterop is one of the possible fixes (I don't think that expanding on the bug here is relevant so I will stop here).

@vzarskus vzarskus added the documentation Improvements or additions to documentation label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant