This repository was archived by the owner on Jun 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-9
lines changed
Expand file tree Collapse file tree 3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2015-present, Facebook, Inc.
3+ * All rights reserved.
4+ *
5+ * This source code is licensed under the BSD-style license found in the
6+ * LICENSE file in the root directory of this source tree. An additional grant
7+ * of patent rights can be found in the PATENTS file in the same directory.
8+ *
9+ * @flow
10+ */
11+ 'use strict' ;
12+
13+ module . exports = window . __REACT_DEVTOOLS_GLOBAL_HOOK__ . nativeObjectCreate ;
Original file line number Diff line number Diff line change 1111
1212var webpack = require ( 'webpack' ) ;
1313var fs = require ( 'fs' ) ;
14- var HELPERS_PATH = __dirname + '/custom-babel-helpers.js' ;
15-
16- var helpers = require ( "babel-core" ) . buildExternalHelpers ( null , 'var' ) ;
17- helpers = helpers . replace ( / O b j e c t \. c r e a t e / g, '__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeObjectCreate' ) ;
18- helpers = helpers + ';module.exports = babelHelpers;' ;
19-
20- fs . writeFileSync ( HELPERS_PATH , helpers ) ;
2114
2215module . exports = {
2316 devtool : 'cheap-module-eval-source-map' ,
@@ -32,7 +25,7 @@ module.exports = {
3225 module : {
3326 loaders : [ {
3427 test : / \. j s x ? $ / ,
35- loader : 'babel-loader?stage=0&externalHelpers=true ' ,
28+ loader : 'babel-loader?stage=0' ,
3629 exclude : [
3730 'node_modules' ,
3831 './helpers.js' ,
@@ -41,7 +34,7 @@ module.exports = {
4134 } ,
4235
4336 plugins : [ new webpack . ProvidePlugin ( {
44- babelHelpers : HELPERS_PATH ,
37+ 'Object.create' : __dirname + '/helpers/object-create.js' ,
4538 Map : __dirname + '/helpers/map.js' ,
4639 WeakMap : __dirname + '/helpers/weak-map.js' ,
4740 Set : __dirname + '/helpers/set.js' ,
Original file line number Diff line number Diff line change 66 </ head >
77 < body >
88 < script src ="build/sink.js "> </ script >
9+ < script >
10+ Object . create = null ;
11+ Map = null ;
12+ Set = null ;
13+ WeakMap = null ;
14+ </ script >
915 </ body >
1016</ html >
1117
You can’t perform that action at this time.
0 commit comments