Simple Config for Rollup
Last active
May 16, 2017 01:14
-
-
Save hew/92c22a9fc0f367a9ae6ba7ff73e9703a to your computer and use it in GitHub Desktop.
Babel Rollup Boilerplate
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": [ | |
| ["env", { | |
| "targets": { | |
| "browsers": ["last 2 versions", "safari >= 7"] | |
| }, | |
| "modules": false | |
| }] | |
| ], | |
| "plugins": [ | |
| "external-helpers" | |
| ] | |
| } |
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
| { | |
| "scripts": { | |
| "build": "babel ./js/main.js -o ./js/main.bundle.js" | |
| }, | |
| "dependencies": { | |
| "babel-cli": "^6.24.1", | |
| "jump.js": "^1.0.2", | |
| "mojs": "^0.2.0" | |
| }, | |
| "devDependencies": { | |
| "babel-cli": "^6.24.1", | |
| "babel-plugin-external-helpers": "^6.22.0", | |
| "babel-preset-env": "^1.4.0", | |
| "babel-preset-stage-1": "^6.24.1", | |
| "rollup": "^0.41.6", | |
| "rollup-plugin-babel": "^2.7.1", | |
| "rollup-plugin-node-resolve": "^3.0.0" | |
| } | |
| } |
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 resolve from 'rollup-plugin-node-resolve'; | |
| import babel from 'rollup-plugin-babel'; | |
| export default { | |
| entry: 'js/main.js', | |
| format: 'es', | |
| plugins: [ | |
| resolve(), | |
| babel({ | |
| exclude: 'node_modules/**' // only transpile our source code | |
| }) | |
| ], | |
| dest: './js/main.bundle.js' | |
| } | |
| console.log('BUILT! 😈'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment