Skip to content

Instantly share code, notes, and snippets.

@therealklanni
Created January 24, 2016 20:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save therealklanni/d082f03005f7ea804d21 to your computer and use it in GitHub Desktop.
Rollup build script (bad example)
import { rollup } from 'rollup';
import babel from 'rollup-plugin-babel';
rollup({
entry: 'index.js',
plugins: [ babel({ presets: ['es2015-rollup'] }) ]
}).then(bundle => bundle.write({
dest: 'dist/module.js',
format: 'cjs',
sourceMap: 'inline'
})).catch(error => console.log(error));
rollup({
entry: 'index.js',
plugins: [ babel({ presets: ['es2015-rollup'] }) ]
}).then(bundle => bundle.write({
dest: 'dist/module.es2015.js',
format: 'es6',
sourceMap: 'inline'
})).catch(error => console.log(error));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment