{"id":21995346,"url":"https://github.com/polymerlabs/lit-html-build","last_synced_at":"2025-10-03T16:29:21.481Z","repository":{"id":41652609,"uuid":"260608463","full_name":"PolymerLabs/lit-html-build","owner":"PolymerLabs","description":"Example Rollup build for lit-html","archived":false,"fork":false,"pushed_at":"2025-04-09T13:35:03.000Z","size":583,"stargazers_count":6,"open_issues_count":13,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-30T17:39:23.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PolymerLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-05-02T03:46:32.000Z","updated_at":"2022-12-14T23:13:53.000Z","dependencies_parsed_at":"2025-04-30T17:40:50.180Z","dependency_job_id":"f2fb8baa-dbfe-4900-addc-dcd96d2651e7","html_url":"https://github.com/PolymerLabs/lit-html-build","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PolymerLabs/lit-html-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Flit-html-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Flit-html-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Flit-html-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Flit-html-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolymerLabs","download_url":"https://codeload.github.com/PolymerLabs/lit-html-build/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolymerLabs%2Flit-html-build/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268658684,"owners_count":24285744,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-29T21:14:20.490Z","updated_at":"2025-10-03T16:29:16.456Z","avatar_url":"https://github.com/PolymerLabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lit-html-build\n\nExample Rollup build for a lit-html project.\n\nProduces a single build with an ES module bundle for modern browsers, and ES5 code + polyfills for older browsers. Tested on IE11, may work on some other older browsers.\n\nThis example uses `\u003cscript type=\"module\"\u003e` and `\u003cscript nomodule\u003e` to serve the correct bundles to modern and legacy browsers. This approach allows you to serve two different JavaScript bundles while using static web serving. \n\nThis approach has some limitations on Edge versions 16-18, which support JavaScript modules using the script tag, but not dynamic imports using the `import()` statement:\n\n```html\n\u003c!-- import using script tag --\u003e\n\u003cscript type=\"module\" src=\"./modules/my-module.js\"\u003e\n```\n\n```js\n// Dynamic imports\nimport('./modules/my-other-module.js').then((moduleObject) =\u003e {\n    // Do something with the module\n  });\n```\n\nIf you use dynamic imports in your code and you need to support these legacy versions of Edge, the module/nomodule trick won't work for you. In this case, the easiest solution is to serve the legacy bundle for all browsers. You'll also need to switch to an output format that supports dynamic loading—such as [SystemJS](https://github.com/systemjs/systemjs).\n\nIf you switch to SystemJS format, you'll need to load the SystemJS loader and call `System.import` to load your main module (instead of using `\u003cscript type=\"module\"\u003e`).\n\n```html\n\u003c!-- minimal SystemJS loader --\u003e\n\u003cscript src=\"/node_modules/systemjs/dist/s.min.js\"\u003e\u003c/script\u003e\n\u003c!-- load main bundle --\u003e\n\u003cscript\u003e\n  System.import('./bundle.js');\n\u003c/script\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerlabs%2Flit-html-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolymerlabs%2Flit-html-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolymerlabs%2Flit-html-build/lists"}