{"id":25205,"library":"elm-esm","title":"elm-esm","description":"Turn Elm compiler output into modern ES Modules. v1.1.4, updated regularly. Transforms traditional Elm JS output to ESM, enabling browser-native module loading without bundlers. Supports CLI usage as a drop-in replacement for elm make, plus a standalone toESModule function for tooling integration. Tested with Elm 0.19.1, works via simple regex transforms. Ideal for directly using Elm in browsers without Webpack or other bundlers.","status":"active","version":"1.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/ChristophP/elm-esm","tags":["javascript"],"install":[{"cmd":"npm install elm-esm","lang":"bash","label":"npm"},{"cmd":"yarn add elm-esm","lang":"bash","label":"yarn"},{"cmd":"pnpm add elm-esm","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS module exports named function; no default export.","wrong":"import toESModule from 'elm-esm';","symbol":"toESModule","correct":"const { toESModule } = require('elm-esm');"}],"quickstart":{"code":"npx elm-esm make src/Main.elm --output=myElmModule.js\n\n<script type=\"module\">\nimport { Elm } from './myElmModule.js';\nElm.Main.init({ node: document.body });\n</script>","lang":"javascript","description":"Build Elm project to ES module and use it in the browser with a script type module."},"warnings":[{"fix":"Use regular elm make for testing; avoid elm-esm with elm-test.","message":"elm-esm is not meant for elm-test; Node.js still has experimental ESM support.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check compatibility; open an issue if problems arise.","message":"Only tested with Elm 0.19.1; may not work with other versions.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npm i -D elm-esm","cause":"Package not installed.","error":"Cannot find module 'elm-esm'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}