-
-
Save piyushchauhan2011/00005130666df38c288a25babaaaf186 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