feat: enable mock account for deploy previews (#211)
This commit is contained in:
parent
0caf7339ef
commit
a397b170ab
3 changed files with 14 additions and 4 deletions
|
@ -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>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue