-
-
Notifications
You must be signed in to change notification settings - Fork 694
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Faakhir30 <[email protected]>
- Loading branch information
Showing
3 changed files
with
371 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
This file is autogenerated. Don't change it directly. | ||
Instead, change the "addons" setting in your package.json file. | ||
*/ | ||
|
||
|
||
const addonsInfo = []; | ||
export { addonsInfo }; | ||
|
||
const safeWrapper = (func) => (config) => { | ||
const res = func(config); | ||
if (typeof res === 'undefined') { | ||
throw new Error("Configuration function doesn't return config"); | ||
} | ||
return res; | ||
} | ||
|
||
const projectConfigLoader = false; | ||
const projectConfig = (config) => { | ||
return projectConfigLoader && typeof projectConfigLoader.default === "function" ? projectConfigLoader.default(config) : config; | ||
} | ||
|
||
const load = (config) => { | ||
const addonLoaders = []; | ||
if(!addonLoaders.every((el) => typeof el === "function")) { | ||
throw new TypeError( | ||
'Each addon has to provide a function applying its configuration to the projects configuration.', | ||
); | ||
} | ||
return projectConfig(addonLoaders.reduce((acc, apply) => safeWrapper(apply)(acc), config)); | ||
}; | ||
export default load; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Disable initial scroll to top after SSR completion. @Faakhir30 |
Oops, something went wrong.