{"id":13827579,"url":"https://github.com/ModuleLoader/browser-es-module-loader","last_synced_at":"2025-07-09T04:32:45.597Z","repository":{"id":66007757,"uuid":"65419260","full_name":"ModuleLoader/browser-es-module-loader","owner":"ModuleLoader","description":"ES Module Loader browser loading example","archived":true,"fork":false,"pushed_at":"2017-10-22T10:18:56.000Z","size":15,"stargazers_count":105,"open_issues_count":2,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-04T09:06:57.246Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ModuleLoader.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}},"created_at":"2016-08-10T22:00:00.000Z","updated_at":"2024-07-25T07:47:53.000Z","dependencies_parsed_at":"2024-01-18T04:10:15.163Z","dependency_job_id":"2450f85d-4e09-4998-b8ae-f330d65a1c6c","html_url":"https://github.com/ModuleLoader/browser-es-module-loader","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModuleLoader%2Fbrowser-es-module-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModuleLoader%2Fbrowser-es-module-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModuleLoader%2Fbrowser-es-module-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModuleLoader%2Fbrowser-es-module-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ModuleLoader","download_url":"https://codeload.github.com/ModuleLoader/browser-es-module-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225486343,"owners_count":17481881,"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-08-04T09:02:02.310Z","updated_at":"2024-11-20T07:30:45.017Z","avatar_url":"https://github.com/ModuleLoader.png","language":"JavaScript","readme":"Browser ES Module Loader\n===\n\nLoads ES modules in the browser via Babel just like the WhatWG HTML specification for modules.\n\nAlso supports the `\u003cscript type=\"module\"\u003e` tag with both `src` and inline forms.\n\nThrows when loading bare / plain names.\n\nSee the `example` folder for a demonstration.\n\nBuilt with the ES Module Loader polyfill 1.0 branch at https://github.com/ModuleLoader/es-module-loader.\n\n### How it works\n\nFetches module sources in the browser, then uses Babel to transform them into System.register modules.\n\nThe loader polyfill then handles the loading and execution pipeline as in the loader spec.\n\n**This project is only suitable for demonstrations / experimentation and is not designed for any production workflows at all.**\n\n### Installation\n\n```\nnpm install browser-es-module-loader\n```\n\n### Usage\n\n```html\n\u003cscript src=\"dist/babel-browser-build.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"dist/browser-es-module-loader.js\"\u003e\u003c/script\u003e\n\n\u003c!-- script type=module loading --\u003e\n\u003cscript type=\"module\" src=\"path/to/module.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Anonymous script type module loading --\u003e\n\u003cscript type=\"module\"\u003e\nimport {x} from './y.js';\n\n// this case throws as plain / bare names are not supported as in the WhatWG spec\nimport thisWillThrow from 'x';\n\n// dynamic import also supported\nimport('./x').then(function (m) {\n  // ...\n});\n\u003c/script\u003e\n\n\u003c!-- dynamic loader instantiation also supported --\u003e\n\u003cscript\u003e\n  var loader = new BrowserESModuleLoader();\n\n  // relative path or URL syntax is necessary as plain resolution throws\n  loader.import('./path/to/file.js').then(function(m) {\n    // ...\n  });\n\u003c/script\u003e\n```\n\nLICENSE\n---\n\nMIT\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FModuleLoader%2Fbrowser-es-module-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FModuleLoader%2Fbrowser-es-module-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FModuleLoader%2Fbrowser-es-module-loader/lists"}