Created
October 16, 2016 21:26
-
-
Save kristw/302a6bac31102972867b851fd76ccc89 to your computer and use it in GitHub Desktop.
Configure rollup with lodash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["es2015"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using lodash-es (an es6 build of lodash) | |
import throttle from 'lodash-es/throttle.js'; | |
// do sth. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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