Allow require of plugin apis (#977)

* Allow require of plugin apis

* missing semicolon
This commit is contained in:
Tim Neutkens 2016-11-19 21:18:07 +01:00 committed by Matheus Fernandes
parent 6853a5c66f
commit cd47cc7636
2 changed files with 5917 additions and 3 deletions

View file

@ -10,10 +10,18 @@ import notify from './notify';
const Module = require('module'); // eslint-disable-line import/newline-after-import
const originalLoad = Module._load;
Module._load = function (path) {
if (path === 'react') {
return React;
switch (path) {
case 'react':
return React;
case 'hyper/component':
return Component;
case 'hyper/notify':
return notify;
case 'hyper/Notification':
return Notification;
default:
return originalLoad.apply(this, arguments);
}
return originalLoad.apply(this, arguments);
};
// remote interface to `../plugins`

5906
yarn.lock Normal file

File diff suppressed because it is too large Load diff