Quality of Frontend Developer's Life: here to stay
This commit is contained in:
parent
fb5261b926
commit
b839ba7870
6 changed files with 52 additions and 9 deletions
|
@ -38,8 +38,17 @@ const afterStoreSetup = ({store, i18n}) => {
|
|||
return {}
|
||||
})
|
||||
.then((staticConfig) => {
|
||||
const overrides = window.___pleromafe_dev_overrides || {}
|
||||
const env = window.___pleromafe_mode.NODE_ENV
|
||||
|
||||
// This takes static config and overrides properties that are present in apiConfig
|
||||
var config = Object.assign({}, staticConfig, apiConfig)
|
||||
let config = {}
|
||||
if (overrides.staticConfigPreference && env === 'DEV') {
|
||||
console.warn('OVERRIDING API CONFIG WITH STATIC CONFIG')
|
||||
config = Object.assign({}, apiConfig, staticConfig)
|
||||
} else {
|
||||
config = Object.assign({}, staticConfig, apiConfig)
|
||||
}
|
||||
|
||||
var theme = (config.theme)
|
||||
var background = (config.background)
|
||||
|
|
|
@ -69,3 +69,9 @@ createPersistedState(persistedStateOptions).then((persistedState) => {
|
|||
|
||||
afterStoreSetup({store, i18n})
|
||||
})
|
||||
|
||||
// These are inlined by webpack's DefinePlugin
|
||||
/* eslint-disable */
|
||||
window.___pleromafe_mode = process.env
|
||||
window.___pleromafe_commit_hash = COMMIT_HASH
|
||||
window.___pleromafe_dev_overrides = DEV_OVERRIDES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue