Skip to content

Instantly share code, notes, and snippets.

@wearhere wearhere/main.js
Created Dec 3, 2017

What would you like to do?
Minimal Babel setup for use with React "hello world". External dependencies purposefully not handled—see for solutions.
import React from 'react';
import ReactDOM from 'react-dom';
<h1>Hello, world!</h1>,
"name": "test",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c"
"author": "",
"license": "MIT",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-preset-react": "^6.24.1",
"rollup": "^0.52.0",
"rollup-plugin-babel": "^3.0.2"
import babel from 'rollup-plugin-babel';
export default {
input: 'main.js',
output: {
file: 'bundle.js',
format: 'iife'
plugins: [
presets: ['react']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.