feat!: compile to JS before publishing#164
Draft
arbrandes wants to merge 1 commit intoopenedx:mainfrom
Draft
Conversation
ba98344 to
1a10c88
Compare
7f44c4e to
a008b3b
Compare
This was referenced Feb 6, 2026
6bcc955 to
c5c8f1c
Compare
Ship compiled JavaScript + .d.ts declarations instead of raw TypeScript source. This allows consuming apps to also pre-compile their TypeScript and use tsc-alias to resolve arbitrary paths (such as @src). At the bundler level, we add tsconfig-paths-webpack-plugin to Webpack configuration so that the Typescript aliases can also be used by Webpack builds without duplicating their definition. As part of this, unify the tsc builds so that everything ends up in /dist, and then use more modern export maps to decouple the internal file structure from the package's API. Of note, the default tsconfig (not the one used by tools) now uses `moduleResolution: bundler` to allow for more modern entrypoint definition. BREAKING CHANGE: consuming apps need to modify their imports and configuration accordingly. See the changes in the migration howto for details. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
c5c8f1c to
eace906
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ship compiled JavaScript +
.d.tsdeclarations instead of raw TypeScript source. This allows consuming apps to also pre-compile their TypeScript and use tsc-alias to resolve arbitrary paths (such as@src).At the bundler level, we add
tsconfig-paths-webpack-pluginto Webpack configuration so that the Typescript aliases can also be used by Webpack builds without duplicating their definition.As part of this, unify the tsc builds so that everything ends up in
/dist, and then use more modern export maps to decouple the internal file structure from the package's API.Of note, the default tsconfig (not the one used by tools) now uses
moduleResolution: bundlerto allow for more modern entrypoint definition.BREAKING CHANGE
Consuming apps need to modify their imports and configuration accordingly. See the changes in the migration howto for details.
Downstream PRs
LLM Usage Notice
Built with assistance from Claude Opus 4.6.