{"id":25943,"library":"mimosa-esperanto-es6-modules","title":"mimosa-esperanto-es6-modules","description":"An ES6 module transpiler plugin for Mimosa build tool that uses Esperanto to convert ES6 module syntax (import/export) to AMD or CommonJS compatible JavaScript with inline source maps. Version 0.3.4 is the latest release; the package appears to be in maintenance mode, with no updates since 2015. It wraps the now-deprecated Esperanto library, which was a predecessor to Babel-like tools. Key differentiator: integrates directly with Mimosa's asset pipeline, allowing automatic transpilation during build. Alternative to Babel integration for Mimosa, but limited to module syntax transpilation only (no ES6 features like arrow functions, classes, etc.). Requires Node >=0.10.","status":"maintenance","version":"0.3.4","language":"javascript","source_language":"en","source_url":"https://github.com/dbashford/mimosa-esperanto-es6-modules","tags":["javascript","mimosa","mmodule","es6","harmony","module","amd","commonjs"],"install":[{"cmd":"npm install mimosa-esperanto-es6-modules","lang":"bash","label":"npm"},{"cmd":"yarn add mimosa-esperanto-es6-modules","lang":"bash","label":"yarn"},{"cmd":"pnpm add mimosa-esperanto-es6-modules","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core transpilation engine for ES6 module syntax","package":"esperanto","optional":false}],"imports":[{"note":"Esperanto library is the dependency; this module is a Mimosa plugin, typically not imported directly by user code.","wrong":"var esperanto = require('esperanto')","symbol":"esperanto","correct":"import esperanto from 'esperanto'"},{"note":"Mimosa automatically discovers the plugin when the module name is listed in config.","wrong":"Adding the package name directly as a module without the 'esperanto-es6-modules' string","symbol":"mimosa-esperanto-es6-modules (plugin config)","correct":"Add 'esperanto-es6-modules' to your mimosa config's `modules` array in `mimosa-config.js`"},{"note":"Not bundled with types; user must define or use @types/esperanto.","wrong":"Directly typing as any","symbol":"EsperantoOptions (TypeScript)","correct":"type EsperantoOptions = { type: 'amd' | 'commonjs'; exclude: RegExp[]; options: { strict: boolean } }"}],"quickstart":{"code":"// In mimosa-config.js\nmodule.exports = {\n  modules: ['esperanto-es6-modules'],\n  esperanto: {\n    type: 'commonjs',\n    exclude: [/[/\\\\]vendor[/\\\\]/, /[/\\\\]main[\\.-]/, /\\.main\\.js$/, /[/\\\\]common\\.js$/],\n    options: {\n      strict: true\n    }\n  }\n};\n\n// Input (ES6 module): src/app.js\nimport { version } from './utils';\nexport function greet() {\n  return 'Hello ' + version;\n}\n\n// Output (CommonJS via mimosa build)\nvar esperanto = require('esperanto');\n// Mimosa processes files automatically; no direct call needed.","lang":"javascript","description":"Shows how to configure mimosa-esperanto-es6-modules in a Mimosa project to transpile ES6 modules to CommonJS."},"warnings":[{"fix":"Switch to a more modern transpiler like mimosa-babel or mimosa-es6-transpiler.","message":"Esperanto is no longer maintained; use Babel or similar instead.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use additional transpiler for other ES6 features, or migrate to a full-featured transpiler like Babel.","message":"Only transpiles ES6 module syntax, not other ES6 features (e.g., arrow functions, classes).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use Node 0.10 to 0.12 for guaranteed compatibility, or upgrade to alternative plugin.","message":"Node >=0.10 only supported; may not work on Node 6+ without issues.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Enclose ES6 module syntax in backticks within CoffeeScript files.","message":"CoffeeScript users must wrap import/export in backticks to avoid being transpiled by CoffeeScript.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using mimosa-babel or mimosa-webpack.","message":"mimosa-esperanto-es6-modules version 0.3.4 is the final release; no future updates.","severity":"deprecated","affected_versions":"0.3.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure esperanto is installed: npm install esperanto --save-dev, or run 'mimosa install' if using Mimosa's module system.","cause":"esperanto dependency not installed (missing from node_modules).","error":"Error: Cannot find module 'esperanto'"},{"fix":"Add 'esperanto-es6-modules' to the modules array in mimosa-config.js.","cause":"Mimosa is not configured to use the module; the 'esperanto-es6-modules' module is missing from the modules list.","error":"SyntaxError: Unexpected token import"},{"fix":"Ensure the 'esperanto' property exists in the exported config object (e.g., esperanto: { type: 'amd' }).","cause":"esperanto configuration object is missing or nil in mimosa-config.","error":"TypeError: Cannot read property 'type' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}