You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The path files in custom-elements.json are pointing to TS source files, like src/components/alert/alert.ts. These paths are supposed to be where consumers can import the element definitions and should be the .js files published to pm.
This is happening because the CEM is run on the source. This serves a few purposes:
Generates a large portion of the documentation
Generates static source code for the React wrappers
Generates vscode.html-custom-data.json for IntelliSense in VS Code
Generates web-types.json for JetBrains IDEs
I don't know how the analyzer can know about the final path, since the source gets run through esbuild after everything is generated. And if the CEM were run on the output code, it wouldn't be able to generate types since those are stripped by esbuild. I'm also not sure how it would handle bundled modules.
What are you using those paths for? Any suggestions for how to solve this?
For now, I'm translating these with a small CEM plugin. When Lit gets unbundled, I'll probably have to generate two separate CEM files but I'm OK with that.
Describe the bug
The
path
files in custom-elements.json are pointing to TS source files, likesrc/components/alert/alert.ts
. These paths are supposed to be where consumers can import the element definitions and should be the .js files published to pm.To Reproduce
Steps to reproduce the behavior:
See the
path
files here: https://unpkg.com/browse/@shoelace-style/shoelace@2.0.0-beta.72/dist/custom-elements.jsonThe text was updated successfully, but these errors were encountered: