-
-
Save vagusX/1c3070b4b83887d7550f to your computer and use it in GitHub Desktop.
This file contains 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 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 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 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