mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 02:56:23 +08:00
perf: remove data-testid in production (#2228)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -80,6 +80,11 @@ const nextConfig = {
|
||||
removeConsole: {
|
||||
exclude: ['error', 'log', 'warn', 'info'],
|
||||
},
|
||||
reactRemoveProperties: !buildFlags.enableTestProperties
|
||||
? {
|
||||
properties: ['^data-testid$'],
|
||||
}
|
||||
: false,
|
||||
emotion: {
|
||||
sourceMap: true,
|
||||
},
|
||||
|
||||
@@ -18,6 +18,9 @@ export const blockSuiteFeatureFlags = {
|
||||
* @type {import('@affine/env').BuildFlags}
|
||||
*/
|
||||
export const buildFlags = {
|
||||
enableTestProperties: process.env.ENABLE_TEST_PROPERTIES
|
||||
? process.env.ENABLE_TEST_PROPERTIES === 'true'
|
||||
: true,
|
||||
enableLegacyCloud: process.env.ENABLE_LEGACY_PROVIDER
|
||||
? process.env.ENABLE_LEGACY_PROVIDER === 'true'
|
||||
: true,
|
||||
|
||||
Reference in New Issue
Block a user