Last active
February 19, 2016 04:50
-
-
Save Rich-Harris/cd0c293f5263b2450412 to your computer and use it in GitHub Desktop.
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 React from 'react'; | |
| console.log( 'React:', React ); |
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
| { | |
| "dependencies": { | |
| "react": "^0.14.3" | |
| }, | |
| "devDependencies": { | |
| "rollup": "^0.21.2", | |
| "rollup-plugin-commonjs": "^1.4.0", | |
| "rollup-plugin-npm": "^1.1.0", | |
| "rollup-plugin-replace": "^1.1.0" | |
| }, | |
| "scripts": { | |
| "build": "rollup -c && open test.html" | |
| } | |
| } |
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 npm from 'rollup-plugin-npm'; | |
| import commonjs from 'rollup-plugin-commonjs'; | |
| import replace from 'rollup-plugin-replace'; | |
| export default { | |
| entry: 'index.js', | |
| dest: 'bundle.js', | |
| plugins: [ | |
| replace({ | |
| 'process.env.NODE_ENV': '"production"' | |
| }), | |
| npm({ | |
| main: true | |
| }), | |
| commonjs({ | |
| include: 'node_modules/**' | |
| }) | |
| ], | |
| format: 'iife' | |
| }; |
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
| <p>check console</p> | |
| <script src='bundle.js'></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment