infrastructure-components
Version:
Infrastructure-Components configure the infrastructure of your React-App as part of your React-Components.
20 lines • 1.07 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_dom_1 = __importDefault(require("react-dom"));
const loader_1 = require("../libs/loader");
const routed_app_1 = require("./routed-app");
/**
* this module must not import anything that does not exist in web-mode, e.g. fs
*/
const createApp = () => {
// load the IsomorphicComponent
// we must load it directly from the module here, to enable the aliad of the config_file_path
const spaConfig = loader_1.loadConfigurationFromModule(require('__CONFIG_FILE_PATH__'), loader_1.INFRASTRUCTURE_MODES.RUNTIME);
react_dom_1.default.render(routed_app_1.createSinglePageApp(spaConfig.routes, spaConfig.redirects), document.getElementById('root'));
};
// this module MUST NOT export anything else. Because it would also load the default, which would be executed right away
exports.default = createApp();
//# sourceMappingURL=spa.js.map
;