Skip to content

Instantly share code, notes, and snippets.

@kristw
Created October 16, 2016 21:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kristw/302a6bac31102972867b851fd76ccc89 to your computer and use it in GitHub Desktop.
Save kristw/302a6bac31102972867b851fd76ccc89 to your computer and use it in GitHub Desktop.
Configure rollup with lodash
{
"presets": ["es2015"]
}
// Using lodash-es (an es6 build of lodash)
import throttle from 'lodash-es/throttle.js';
// do sth.
import babel from 'rollup-plugin-babel';
import babelrc from 'babelrc-rollup';
import nodeResolve from 'rollup-plugin-node-resolve';
export default {
entry: 'src/main.js',
plugins: [
nodeResolve(),
babel(babelrc())
],
targets: [
{
dest: 'dist/slimfit.js',
format: 'umd',
moduleName: 'slimfit',
sourceMap: true
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment