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

build fully specified imports for prod #1377

Merged
3 commits merged into from Mar 17, 2022
Merged

build fully specified imports for prod #1377

3 commits merged into from Mar 17, 2022

Conversation

ghost
Copy link

@ghost ghost commented Mar 16, 2022

Description

This PR uses our build toolchain to create fully specified module imports/exports before we publish production code. This is important because ultimately we are targeting a browser based platform that requires this (see spec details below). We also have a necessary intermediate step of using module bundlers applied by downstream teams which will also need to interop with our module syntax. Making this change allows both platforms to understand our ESM code.

Background information:

This PR purposefully does not update our source code imports directly because TS currently has limited support for this new resolution pattern and the current implementation is gated behind nightly pre-release distribution tags that contain bugs that will not work for us. In the future once the nodenext API matures we can switch over to handling this as part of our version controlled source (enforced through typescript compiler) if we want to reduce build complexity.

@ghost ghost self-requested a review as a code owner March 16, 2022 18:47
@ghost ghost self-assigned this Mar 16, 2022
@macyabbey-okta
Copy link
Contributor

Thanks for including the reference links - I've run into this one but didn't know it's known and being worked on. I should be looking in the Typescript repo more often.

image

Sidebar: The creator of node.js has a youtube presentation talking about node mistakes he regrets and not requiring file extension always was one of them.

@ghost ghost force-pushed the jb-import-specifiers-2 branch from 759e3c8 to a845b78 Compare March 17, 2022 17:57
@ghost ghost force-pushed the jb-import-specifiers-2 branch from a845b78 to a6a0abf Compare March 17, 2022 17:59
Copy link
Contributor

@andrewberg-okta andrewberg-okta left a comment

Choose a reason for hiding this comment

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

Working well in office hours discussion, good to go.

@ghost ghost merged commit 8b6493d into develop Mar 17, 2022
@ghost ghost deleted the jb-import-specifiers-2 branch March 17, 2022 21:08
This pull request was closed.
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.

None yet

2 participants