{"id":25237,"library":"es6-micro-loader","title":"es6-micro-loader","description":"A minimal ES6 System loader polyfill for browsers and Node.js, implementing the System.register() format for ES modules. Current stable version is 0.2.1, with infrequent releases. Unlike full implementations like SystemJS, it focuses on a tiny subset of the spec to maintain ES module semantics while remaining lightweight. Supports anonymous and named modules, basic network fetching in browsers, and direct file import in Node.js. Requires a separate Promise polyfill (es6-promise or bluebird). Not actively maintained; consider upgrading to SystemJS for full spec compliance.","status":"maintenance","version":"0.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/caridy/es6-micro-loader","tags":["javascript","es6","module","loader","system","register"],"install":[{"cmd":"npm install es6-micro-loader","lang":"bash","label":"npm"},{"cmd":"yarn add es6-micro-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add es6-micro-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Promise-based System.import() calls in older browsers","package":"es6-promise","optional":true},{"reason":"Alternative Promise polyfill to es6-promise","package":"bluebird","optional":true}],"imports":[{"note":"Package does not support ESM imports; use CommonJS require().","wrong":"import System from 'es6-micro-loader';","symbol":"System","correct":"var System = require('es6-micro-loader');"},{"note":"System.import returns a Promise; do not use callback pattern.","wrong":"System.import('path/to/module', callback);","symbol":"System.import","correct":"System.import('path/to/module').then(function(mod) { /* ... */ });"},{"note":"Synchronous check for module existence.","wrong":null,"symbol":"System.has","correct":"System.has('module-name')"}],"quickstart":{"code":"// In Node.js\nvar System = require('es6-micro-loader');\nSystem.import('path/to/module')\n  .then(function(mod) {\n    console.log('Module loaded', mod);\n  })\n  .catch(function(err) {\n    console.error('Loading failed', err);\n  });\n\n// In browser after including polyfill\n<script src=\"path/to/system-polyfill.min.js\"></script>\n<script>\n  System.import('named/foo').then(function(foo) {\n    foo.init();\n  });\n</script>","lang":"javascript","description":"Shows basic usage in Node.js and browser: require the polyfill, then call System.import() with a module path, handling promise resolution."},"warnings":[{"fix":"Migrate to SystemJS (https://github.com/systemjs/systemjs) for spec-compliant loader.","message":"Package is in maintenance mode; full spec features not implemented.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Use path.resolve() to convert relative paths to absolute before calling System.import().","message":"In Node.js, System.import() expects a global path from application root, not a relative path.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Include a Promise polyfill like es6-promise or bluebird before using System.import().","message":"Package does not provide a Promise polyfill; Promise must be globally available.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Set System.baseURL to the correct base path before importing modules.","message":"Browser version relies on System.baseURL (defaults to '/') to fetch modules; modules must be served from that base path.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install es6-micro-loader --save' and ensure node_modules contains the package.","cause":"Package not installed or installed incorrectly.","error":"Error: Cannot find module 'es6-micro-loader'"},{"fix":"In browser: ensure <script> for system-polyfill.js is included. In Node: use var System = require('es6-micro-loader');","cause":"System polyfill not loaded or not correctly imported.","error":"TypeError: System.import is not a function"},{"fix":"Load a Promise polyfill (e.g., es6-promise) before calling System.import().","cause":"Promise not available in the environment.","error":"TypeError: System.import(...).then is not a function"},{"fix":"Ensure module is loaded via <script> tag with correct System.register() name, and use exact name in System.import().","cause":"Module not registered or path incorrect.","error":"Error: Module 'named/foo' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}