feat: enable mock account for deploy previews (#211)

This commit is contained in:
Daniel Roe 2022-11-29 06:39:49 +00:00 committed by GitHub
parent 0caf7339ef
commit a397b170ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View file

@ -31,6 +31,7 @@ export default defineNuxtConfig({
define: {
'import.meta.env.__BUILD_TIME__': JSON.stringify(new Date().toISOString()),
'process.env.VSCODE_TEXTMATE_DEBUG': 'false',
'process.mock': isCI && process.env.PULL_REQUEST === 'true' && process.env.MOCK_USER,
},
build: {
target: 'esnext',
@ -95,3 +96,11 @@ export default defineNuxtConfig({
defaultLocale: 'en-US',
},
})
declare global {
namespace NodeJS {
interface Process {
mock?: Record<string, any>
}
}
}