Correction chargement dynamique
This commit is contained in:
parent
f752865d33
commit
f2d6a72204
|
@ -9,14 +9,14 @@ import { createClient } from '../util/apollo';
|
||||||
import { ApolloProvider } from '@apollo/client';
|
import { ApolloProvider } from '@apollo/client';
|
||||||
import { AppLoader } from './AppLoader';
|
import { AppLoader } from './AppLoader';
|
||||||
|
|
||||||
const LazyHomePage = React.lazy(() => import('./HomePage/HomePage'));
|
const LazyHomePage = React.lazy(() => import(/* webpackChunkName: "HomePage" */'./HomePage/HomePage'));
|
||||||
const LazyDashboardPage = React.lazy(() => import('./DashboardPage/DashboardPage'));
|
const LazyDashboardPage = React.lazy(() => import(/* webpackChunkName: "DashboardPage" */'./DashboardPage/DashboardPage'));
|
||||||
const LazyUnauthorizedPage = React.lazy(() => import('./UnauthorizedPage/UnauthorizedPage'));
|
const LazyUnauthorizedPage = React.lazy(() => import(/* webpackChunkName: "UnauthorizedPage" */'./UnauthorizedPage/UnauthorizedPage'));
|
||||||
const LazyConferencePage = React.lazy(() => import('./ConferencePage/ConferencePage'));
|
const LazyConferencePage = React.lazy(() => import(/* webpackChunkName: "ConferencePage" */'./ConferencePage/ConferencePage'));
|
||||||
const LazyDecisionSupportFilePage = React.lazy(() => import('./DecisionSupportFilePage/DecisionSupportFilePage'));
|
const LazyDecisionSupportFilePage = React.lazy(() => import(/* webpackChunkName: "DecisionSupportFilePage" */'./DecisionSupportFilePage/DecisionSupportFilePage'));
|
||||||
const LazyProfilePage = React.lazy(() => import('./ProfilePage/ProfilePage'));
|
const LazyProfilePage = React.lazy(() => import(/* webpackChunkName: "ProfilePage" */'./ProfilePage/ProfilePage'));
|
||||||
const LazyWorkgroupPage = React.lazy(() => import('./WorkgroupPage/WorkgroupPage'));
|
const LazyWorkgroupPage = React.lazy(() => import(/* webpackChunkName: "WorkgroupPage" */'./WorkgroupPage/WorkgroupPage'));
|
||||||
const LazyLogoutPage = React.lazy(() => import('./LogoutPage'));
|
const LazyLogoutPage = React.lazy(() => import(/* webpackChunkName: "LogoutPage" */'./LogoutPage'));
|
||||||
|
|
||||||
export interface AppProps {
|
export interface AppProps {
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ export const Config = {
|
||||||
graphQLEndpoint: get<string>("graphQLEndpoint", "http://localhost:8081/api/v1/graphql"),
|
graphQLEndpoint: get<string>("graphQLEndpoint", "http://localhost:8081/api/v1/graphql"),
|
||||||
subscriptionEndpoint: get<string>("subscriptionEndpoint", "ws://localhost:8081/api/v1/graphql"),
|
subscriptionEndpoint: get<string>("subscriptionEndpoint", "ws://localhost:8081/api/v1/graphql"),
|
||||||
conferenceHeartbeatInterval: get<number>("conferenceHeartbeatInterval", 10000),
|
conferenceHeartbeatInterval: get<number>("conferenceHeartbeatInterval", 10000),
|
||||||
|
frontendBaseURL: get<string>("frontendBaseURL", window.location.protocol + '//' + window.location.host + '/'),
|
||||||
};
|
};
|
||||||
|
|
||||||
function get<T>(key: string, defaultValue: T):T {
|
function get<T>(key: string, defaultValue: T):T {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
import { Config } from './config';
|
||||||
|
|
||||||
|
declare var __webpack_public_path__: string;
|
||||||
|
__webpack_public_path__ = Config.frontendBaseURL;
|
||||||
|
|
||||||
import './sass/_all.scss';
|
import './sass/_all.scss';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
@ -9,6 +14,7 @@ import '@fortawesome/fontawesome-free/js/regular'
|
||||||
import '@fortawesome/fontawesome-free/js/brands'
|
import '@fortawesome/fontawesome-free/js/brands'
|
||||||
import './resources/favicon.png';
|
import './resources/favicon.png';
|
||||||
|
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<App />,
|
<App />,
|
||||||
document.getElementById('app')
|
document.getElementById('app')
|
||||||
|
|
Loading…
Reference in New Issue