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

Merged
merged 1 commit into from
Feb 4, 2025
Merged

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>
@victorlin victorlin self-assigned this Jan 15, 2025
@nextstrain-bot nextstrain-bot temporarily deployed to nextstrain-s-victorlin--ptzfgd January 15, 2025 21:44 Inactive
@victorlin victorlin marked this pull request as ready for review January 15, 2025 21:59
@victorlin victorlin merged commit 531cefa into master Feb 4, 2025
8 checks passed
@victorlin victorlin deleted the victorlin/remove-js-extensions branch February 4, 2025 18:10
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.

3 participants