created dev build
This commit is contained in:
parent
7fa9273cf7
commit
c191b7c2bd
3 changed files with 2214 additions and 2004 deletions
|
@ -9,7 +9,7 @@ function getDeepestChildValue (parent, childrenKeys) {
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dynamicImport = (filePath) => {
|
export const dynamicImport = (filePath) => {
|
||||||
// validate inputs
|
// validate inputs
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
throw new Error('no file path provided to dynamicImport()');
|
throw new Error('no file path provided to dynamicImport()');
|
||||||
|
@ -25,8 +25,6 @@ const dynamicImport = (filePath) => {
|
||||||
if (customComponent) {
|
if (customComponent) {
|
||||||
return customComponent; // return custom component
|
return customComponent; // return custom component
|
||||||
} else {
|
} else {
|
||||||
return require(filePath); // return default component
|
return require(`${filePath}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default dynamicImport;
|
|
||||||
|
|
1486
index.js
1486
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…
Reference in a new issue