{"id":18312680,"url":"https://github.com/johnste/lit-component-angular-repro","last_synced_at":"2025-04-09T12:20:16.451Z","repository":{"id":148611494,"uuid":"413152853","full_name":"johnste/lit-component-angular-repro","owner":"johnste","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-04T06:53:48.000Z","size":147,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T06:26:07.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnste.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-03T17:46:33.000Z","updated_at":"2023-01-30T00:12:05.000Z","dependencies_parsed_at":"2023-05-20T17:15:17.663Z","dependency_job_id":null,"html_url":"https://github.com/johnste/lit-component-angular-repro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnste%2Flit-component-angular-repro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnste%2Flit-component-angular-repro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnste%2Flit-component-angular-repro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnste%2Flit-component-angular-repro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnste","download_url":"https://codeload.github.com/johnste/lit-component-angular-repro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036279,"owners_count":21037142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T16:25:03.270Z","updated_at":"2025-04-09T12:20:16.413Z","avatar_url":"https://github.com/johnste.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Example repro using a lit based web component\n\nin development mode `npm start` everything works fine.\nwhen building `npm run build -- --prod` and serving, the web component code is missing\n\nSolved:\nThe problem turned out to be [@angular-devkit/build-optimizer](https://www.npmjs.com/package/@angular-devkit/build-optimizer) assuming all decorators are side effect free (which lit's isn't, and, assuming neither is Stencil's). See this discussion https://github.com/angular/angular-cli/issues/20714#issuecomment-841255528\n\nRegistering the lit component directly (e.g. `customElements.define('simple-component', SimpleComponent);`) works.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnste%2Flit-component-angular-repro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnste%2Flit-component-angular-repro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnste%2Flit-component-angular-repro/lists"}