Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit b6b7f20

Browse files
author
ShihChi Huang
committed
Revert "use webpack DefinePlugin to dramatically simplify things"
This reverts commit d748a51.
1 parent 68a71d3 commit b6b7f20

5 files changed

Lines changed: 54 additions & 5 deletions

File tree

shells/chrome/helpers/map.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
*/
10+
'use strict';
11+
12+
module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeMap;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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;

shells/chrome/helpers/set.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
*/
10+
'use strict';
11+
12+
module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeSet;

shells/chrome/helpers/weak-map.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
*/
10+
'use strict';
11+
12+
module.exports = window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeWeakMap;

shells/chrome/webpack.backend.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ module.exports = {
3131
}],
3232
},
3333

34-
plugins: [new webpack.DefinePlugin({
35-
'Object.create': 'window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeObjectCreate',
36-
WeakMap: 'window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeWeakMap',
37-
Map: 'window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeMap',
38-
Set: 'window.__REACT_DEVTOOLS_GLOBAL_HOOK__.nativeSet',
34+
plugins: [new webpack.ProvidePlugin({
35+
'Object.create': __dirname + '/helpers/object-create.js',
36+
Map: __dirname + '/helpers/map.js',
37+
WeakMap: __dirname + '/helpers/weak-map.js',
38+
Set: __dirname + '/helpers/set.js',
3939
})],
4040
};

0 commit comments

Comments
 (0)