Skip to content

fix: create plugin to export .js file references instead of .ts files in CEM#36104

Open
chrisdholt wants to merge 3 commits into
microsoft:masterfrom
chrisdholt:users/chhol/fix-custom-elements-manifest-file-source
Open

fix: create plugin to export .js file references instead of .ts files in CEM#36104
chrisdholt wants to merge 3 commits into
microsoft:masterfrom
chrisdholt:users/chhol/fix-custom-elements-manifest-file-source

Conversation

@chrisdholt
Copy link
Copy Markdown
Member

Previous Behavior

The CEM output points to .ts files.

New Behavior

the CEM output uses a plugin to map .ts output to .js output.

Related Issue(s)

@chrisdholt chrisdholt requested a review from a team as a code owner May 5, 2026 20:47
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

📊 Bundle size report

✅ No changes found

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

@github-actions github-actions Bot May 5, 2026

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-web-components/Badge 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Badge. - Dark Mode.normal.chromium.png 443 Changed
vr-tests-web-components/RadioGroup 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/RadioGroup. - Dark Mode.normal.chromium_1.png 89 Changed
vr-tests-web-components/TextInput 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/TextInput. - Dark Mode.normal.chromium_1.png 288 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

Comment on lines +19 to +21
function toDistPath(sourcePath) {
return './' + sourcePath.replace(/^src\//, 'dist/esm/').replace(/\.ts$/, '.js');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't need to block, but do we need some validation that all modules in the CEM actually exist in the dist/esm?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good callout and we should block - there's definitely a bug in this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@davatron5000 I created a test to run (like confirming packaging) which runs after analyze-cem...take a look and let me know if you have thoughts. The previous implementation broke names in the process of conversion.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Pull request demo site: URL

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.

[Bug]: custom elements manifest incorrectly links to typescript files

3 participants