File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,12 @@ export default defineNuxtModule<ModuleOptions>({
16
16
const resolver = createResolver ( import . meta. url )
17
17
18
18
if ( ! process . env . NUXT_SESSION_PASSWORD ) {
19
- console . warn ( 'No session password set, using a random password, please set NUXT_SESSION_PASSWORD in your .env file with at least 32 chars' )
20
19
const randomPassword = sha256 ( `${ Date . now ( ) } ${ Math . random ( ) } ` ) . slice ( 0 , 32 )
21
- console . log ( `NUXT_SESSION_PASSWORD=${ randomPassword } ` )
22
20
process . env . NUXT_SESSION_PASSWORD = randomPassword
21
+ if ( ! nuxt . options . _prepare ) {
22
+ console . warn ( 'No session password set, using a random password, please set NUXT_SESSION_PASSWORD in your .env file with at least 32 chars' )
23
+ console . log ( `NUXT_SESSION_PASSWORD=${ randomPassword } ` )
24
+ }
23
25
}
24
26
25
27
// App
You can’t perform that action at this time.
0 commit comments