Esbuild plugin for loading elm
npm install esbuild-plugin-elm
```
yarn add -D esbuild-plugin-elm
// OR
npm install -D esbuild-plugin-elm
A simple example can be found in ./example.
`js`
esbuild.build({
entryPoints: ['src/index.js'],
bundle: true,
outfile: 'dist/bundle.js',
plugins: [
ElmPlugin(options) // options are documented below
],
}).catch(e => (console.error(e), process.exit(1)))
Import paths will be resolved using the paths listed in source-directories in elm.json. If none resolve, the import is assumed to be relative to the importing file.
debug (default: false)*:
Enable the time-travelling debugger
optimize (default: NODE_ENV === 'production')*:
Optimize the js output (true by default if NODE_ENV is production)
pathToElm (default: node_modules/.bin/elm || elm)*:
Specify an explicit path to the elm executable
clearOnWatch (default: false)*:
Clear the console before re-building on file changes
cwd (default: )*:
The current working directory/elm project root
verbose (default: false)*:
Enable verbose output of node-elm-compiler
* How to Install Elm, on a Rails App, via esbuild, using esbuild-plugin-elm`