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

Remove extension on ESM imports #1110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Jan 15, 2025

Description of proposed changes

This reverts commit "auspice-client: Append extension on ESM imports" (7cde839).

The reasoning in that commit was that extensions are necessary for Webpack 5. However, this is not entirely accurate - they are only required when using the default for resolve.fullySpecified and using "type": "module" package.json. The latter is not true in our case.

Notably, removing the exact path for auspice/src/components/markdownDisplay allows the usage to be tolerant of filename changes such as TypeScript conversion.

Related issue(s)

Unblocks changes such as nextstrain/auspice@ff91cfd

Checklist

This reverts commit "auspice-client: Append extension on ESM imports"
(7cde839).

The reasoning in that commit was that extensions are necessary for
Webpack 5. However, this is not entirely accurate - they are only
required¹ when using the default for resolve.fullySpecified *and* using
"type": "module" package.json. The latter is not true in our case.

Notably, removing the exact path for
`auspice/src/components/markdownDisplay` allows the usage to be tolerant
of filename changes such as TypeScript conversion.

¹ <https://webpack.js.org/configuration/module/#resolvefullyspecified>
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