created dev build
This commit is contained in:
parent
3ad5a7d24c
commit
7fa9273cf7
4 changed files with 284 additions and 276 deletions
|
@ -1,10 +1,10 @@
|
|||
import React from 'react';
|
||||
import { Route, Switch } from 'react-router-dom';
|
||||
import { dynamicImport } from 'utils/dynamicImport';
|
||||
import AboutPage from 'pages/AboutPage';
|
||||
import LoginPage from 'pages/LoginPage';
|
||||
import ShowPage from 'pages/ShowPage';
|
||||
import FourOhFourPage from 'containers/FourOhFourPage';
|
||||
const dynamicImport = require('utils/dynamicImport.js');
|
||||
const HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage
|
||||
|
||||
const App = () => {
|
||||
|
|
|
@ -9,7 +9,7 @@ function getDeepestChildValue (parent, childrenKeys) {
|
|||
return child;
|
||||
}
|
||||
|
||||
export const dynamicImport = (filePath) => {
|
||||
const dynamicImport = (filePath) => {
|
||||
// validate inputs
|
||||
if (!filePath) {
|
||||
throw new Error('no file path provided to dynamicImport()');
|
||||
|
@ -28,3 +28,5 @@ export const dynamicImport = (filePath) => {
|
|||
return require(filePath); // return default component
|
||||
}
|
||||
};
|
||||
|
||||
export default dynamicImport;
|
||||
|
|
265
index.js
265
index.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue