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

Enable building the application with the ESM build system #1203

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 27, 2023

No description provided.

@clydin clydin marked this pull request as ready for review April 27, 2023 19:31
@clydin clydin changed the title Enabled building the application with the ESM build system Enable building the application with the ESM build system Apr 27, 2023
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The `normalize-path` package was previously imported via a namespace import.
However, the ECMAScript specification returns an exotic namespace object from
namespace imports which can never be a function. As a result a namespace import
can not be called. Since the import is directly called it must be imported As
a default import to be ECMAScript compliant. TypeScript by default allows the
non-compliant form even though it can result in runtime errors. The TypeScript
`esModuleInterop` option (recommended by TypeScript) causes TypeScript to error
on non-compliant usage and ensures the correct code is emitted so that the code
can be executed and/or bundled in an ESM environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants