Skip to content

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

Open
chrisdholt wants to merge 2 commits intomicrosoft: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 2 commits intomicrosoft: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/Avatar 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Avatar. - Dark Mode.normal.chromium.png 10380 Changed
vr-tests-web-components/MenuList 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - RTL.1st selected.chromium_2.png 39384 Changed
vr-tests-web-components/MenuList. - RTL.2nd selected.chromium.png 17 Changed
vr-tests-web-components/MenuList. - Dark Mode.normal.chromium.png 498 Changed

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