Skip to content

Commit

Permalink
feat(overmind): custom dev name
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Jan 23, 2021
1 parent 8b2d584 commit 06d82a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/node_modules/overmind/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ export class Overmind<ThisConfig extends IConfiguration>
} as DefaultMode
) {
const name = options.name || 'OvermindApp'
const devEnv = options.devEnv || 'development'

this.delimiter = options.delimiter || '.'

if (
(!process.env.NODE_ENV || process.env.NODE_ENV === 'development') &&
(!process.env.NODE_ENV || process.env.NODE_ENV === devEnv) &&
mode.mode === MODE_DEFAULT &&
options.hotReloading !== false &&
!(process && process.title && process.title.includes('node'))
Expand All @@ -237,7 +238,7 @@ export class Overmind<ThisConfig extends IConfiguration>
const proxyStateTree = this.createProxyStateTree(
configuration,
eventHub,
mode.mode === MODE_SSR ? false : process.env.NODE_ENV === 'development'
mode.mode === MODE_SSR ? false : process.env.NODE_ENV === devEnv
)
this.originalConfiguration = configuration
this.state = proxyStateTree.state
Expand All @@ -257,7 +258,7 @@ export class Overmind<ThisConfig extends IConfiguration>
}

if (
process.env.NODE_ENV === 'development' &&
process.env.NODE_ENV === devEnv &&
mode.mode === MODE_DEFAULT &&
typeof window !== 'undefined'
) {
Expand Down

0 comments on commit 06d82a7

Please sign in to comment.