chore: update build flags
This commit is contained in:
parent
125a803824
commit
b85b2257e4
4 changed files with 4 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ import { logger } from './shared'
|
|||
|
||||
onModuleFirstRequired(0, function onceIndexRequired() {
|
||||
runCatching(() => {
|
||||
if (!__BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__) require('./patches/log-promise-rejections')
|
||||
if (__BUILD_FLAG_LOG_PROMISE_REJECTIONS__) require('./patches/log-promise-rejections')
|
||||
|
||||
// Initialize preinit libraries
|
||||
require('@revenge-mod/modules/preinit')
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default async function build(dev = false, log = true) {
|
|||
__BUILD_COMMIT__: JSON.stringify((await $`git rev-parse HEAD`.text()).trim().substring(0, 7)),
|
||||
__BUILD_BRANCH__: JSON.stringify((await $`git rev-parse --abbrev-ref HEAD`.text()).trim()),
|
||||
__BUILD_ENV__: JSON.stringify(dev ? 'development' : 'production'),
|
||||
__BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: String(!dev),
|
||||
__BUILD_FLAG_LOG_PROMISE_REJECTIONS__: String(dev),
|
||||
},
|
||||
plugins: [
|
||||
swcPlugin(),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { ReactJsxRuntime } from '@revenge-mod/react'
|
||||
import { getProxyTarget, isProxy } from '@revenge-mod/utils/proxy'
|
||||
|
||||
import type { ElementType } from 'react'
|
||||
|
||||
const { jsx: _jsx, jsxs: _jsxs, Fragment } = ReactJsxRuntime
|
||||
|
|
|
|||
2
types.d.ts
vendored
2
types.d.ts
vendored
|
|
@ -6,7 +6,7 @@ declare global {
|
|||
const __BUILD_BRANCH__: string
|
||||
const __BUILD_VERSION__: string
|
||||
|
||||
const __BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: boolean
|
||||
const __BUILD_FLAG_LOG_PROMISE_REJECTIONS__: boolean
|
||||
}
|
||||
|
||||
export {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue