chore(build): try to build demo and docs (#3434)
This commit is contained in:
1 parent
869b8ced05
commit
828690cd3b
329 files changed
+1896
-1010
No files matched your search
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Entry point for development and production PWA builds.
|
||||
*/
|
||||
import 'regenerator-runtime/runtime';
|
||||
import App from './App';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { history } from './utils/history';
|
||||
|
||||
/**
|
||||
* EXTENSIONS AND MODES
|
||||
* =================
|
||||
* pluginImports.js is dynamically generated from extension and mode
|
||||
* configuration at build time.
|
||||
*
|
||||
* pluginImports.js imports all of the modes and extensions and adds them
|
||||
* to the window for processing.
|
||||
*/
|
||||
import {
|
||||
modes as defaultModes,
|
||||
extensions as defaultExtensions,
|
||||
} from './pluginImports';
|
||||
import loadDynamicConfig from './loadDynamicConfig';
|
||||
|
||||
loadDynamicConfig(window.config).then(config_json => {
|
||||
// Reset Dynamic config if defined
|
||||
if (config_json !== null) {
|
||||
window.config = config_json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine our appConfiguration with installed extensions and modes.
|
||||
* In the future appConfiguration may contain modes added at runtime.
|
||||
* */
|
||||
const appProps = {
|
||||
config: window ? window.config : {},
|
||||
defaultExtensions,
|
||||
defaultModes,
|
||||
};
|
||||
|
||||
/** Create App */
|
||||
const app = React.createElement(App, appProps, null);
|
||||
/** Render */
|
||||
ReactDOM.render(app, document.getElementById('root'));
|
||||
});
|
||||
|
||||
export { history };
|
||||
Reference in new issue
Block a user