Skip to content

joshi-monster/esbuild-plugin-elm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-elm

An esbuild plugin for building elm projects

npm

Install

Add this plugin to your project's dev-dependencies by running the following -

yarn add -D esbuild-plugin-elm
// OR
npm install -D esbuild-plugin-elm

Usage

A simple example can be found in ./example.

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)))

Options

  • 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: <PWD>):

    The current working directory/elm project root

Tutorials

About

An esbuild plugin for building elm projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 85.4%
  • Elm 10.2%
  • Nix 4.4%