Skip to content

Instantly share code, notes, and snippets.

@Eruant
Created February 4, 2016 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Eruant/d6f4cb5ba72235eca344 to your computer and use it in GitHub Desktop.
Save Eruant/d6f4cb5ba72235eca344 to your computer and use it in GitHub Desktop.
{
"presets": [
"es2015-rollup",
"react"
]
}
import {version} from '../package.json'
import React from 'react'
export default React.createClass({
render () {
return <p>{`The version is ${version}`}</p>
}
})
{
"name": "rollup-test",
"version": "0.0.1",
"scripts": {
"build": "rollup -c"
},
"devDependencies": {
"babel-preset-es2015-rollup": "1.1.1",
"babel-preset-react": "6.3.13",
"rollup": "0.25.2",
"rollup-plugin-babel": "2.3.9",
"rollup-plugin-json": "2.0.0",
"rollup-plugin-npm": "1.4.0",
"rollup-plugin-uglify": "0.1.0"
},
"dependencies": {
"react": "0.14.7"
}
}
import json from 'rollup-plugin-json'
import babel from 'rollup-plugin-babel'
import uglify from 'rollup-plugin-uglify'
import npm from 'rollup-plugin-npm'
export default {
entry: 'src/main.js',
format: 'cjs',
plugins: [
json(),
npm({
buildins: false,
browser: true
}),
babel({
exclude: 'node_modules/**'
}),
uglify()
],
dest: 'out-rollup.js'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment