mirror of
https://github.com/status-im/reagent.git
synced 2025-01-13 05:14:45 +00:00
d9ad7740ec
Demo and tests now can run with webpack-generated React Use js/require, to make Reagent work better with node
16 lines
369 B
JavaScript
16 lines
369 B
JavaScript
|
|
|
|
function exported_require (name) {
|
|
switch (name) {
|
|
case "react": return require("react");
|
|
case "react-dom": return require("react-dom");
|
|
case "react-dom/server": return require("react-dom/server");
|
|
default:
|
|
console.error("Unknown module: ", name);
|
|
}
|
|
}
|
|
|
|
if (!global.require) {
|
|
global.require = exported_require;
|
|
}
|