File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
3- import babel from 'babel-core/browser ' ;
3+ import { transform } from 'babel-standalone ' ;
44import * as ReactToolbox from 'react-toolbox' ;
55import style from './style' ;
66
@@ -47,8 +47,9 @@ const Preview = React.createClass({
4747 (function (${ Object . keys ( this . props . scope ) . join ( ', ' ) } , mountNode) {
4848 ${ this . props . code }
4949 });` ;
50- return babel . transform ( code , {
51- optional : [ 'es7.classProperties' , 'es7.exportExtensions' ]
50+
51+ return transform ( code , {
52+ presets : [ 'es2015' , 'stage-0' , 'react' ]
5253 } ) . code ;
5354 } ,
5455
Original file line number Diff line number Diff line change 99 "deploy" : " gh-pages -d build"
1010 },
1111 "dependencies" : {
12+ "babel-standalone" : " ^1.0.0" ,
1213 "classnames" : " ^2.2.1" ,
1314 "codemirror" : " ^5.10.0" ,
1415 "history" : " ^1.17.0" ,
You can’t perform that action at this time.
0 commit comments