Fix module hijacking (#3067)
Regression was introduced by #2866. Release version of Hyper failed to start.
This commit is contained in:
parent
88f5804ad4
commit
bc6101e98f
5 changed files with 606 additions and 1075 deletions
|
|
@ -18,10 +18,18 @@ Module._load = function _load(path) {
|
|||
// app/plugins.js
|
||||
switch (path) {
|
||||
case 'react':
|
||||
//eslint-disable-next-line no-console
|
||||
console.warn('DEPRECATED: If your plugin requires `react`, it must bundle it as a dependency');
|
||||
return React;
|
||||
case 'react-dom':
|
||||
//eslint-disable-next-line no-console
|
||||
console.warn('DEPRECATED: If your plugin requires `react-dom`, it must bundle it as a dependency');
|
||||
return ReactDOM;
|
||||
case 'hyper/component':
|
||||
//eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
'DEPRECATED: If your plugin requires `hyper/component`, it must requires `react.PureComponent` instead and bundle `react` as a dependcy'
|
||||
);
|
||||
return PureComponent;
|
||||
case 'hyper/notify':
|
||||
return notify;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue