rollup-plugin-elm2
v0.2.0
Published
Bundle Elm programs with Rollup
Downloads
7
Readme
rollup-plugin-elm2
Bundle Elm programs with Rollup
Supported Elm version: 0.19
Usage
import Elm from './Main.Elm';
const node = document.getElementById('app');
const app = Elm.Main.init({ node });
rollup.config.js
import elm from 'rollup-plugin-elm2';
const production = !process.env.ROLLUP_WATCH;
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.js',
format: 'es',
},
plugins: [
elm({
exclude: 'elm-stuff/**',
compiler: {
optimize: production,
debug: !production,
},
}),
],
};
Check the /example
for a complete example.
Options
{
include: [],
exclude: [],
compiler: {
// Enable / Disable compiler optimizations (default: false)
optimize: true,
// Enable / Disable debug mode (default: false)
debug: false,
// Path to Elm executable (default: elm)
pathToElm: path.resolve(__dirname, 'node_modules/elm/bin/elm')
}
}