From a35f0d43e40d7178616b91bd62a9948ed3984ae1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 16 May 2023 19:24:10 +0900 Subject: [PATCH] refactor: define _IS_CHROMATIC_ --- packages/frontend/.eslintrc.js | 1 + packages/frontend/.storybook/main.ts | 3 +++ packages/frontend/@types/global.d.ts | 1 + packages/frontend/src/components/MkAnimBg.vue | 3 +-- packages/frontend/vite.config.ts | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/frontend/.eslintrc.js b/packages/frontend/.eslintrc.js index e8e0e57d2..0b7750c9f 100644 --- a/packages/frontend/.eslintrc.js +++ b/packages/frontend/.eslintrc.js @@ -82,6 +82,7 @@ module.exports = { '_LANGS_': false, '_VERSION_': false, '_ENV_': false, + '_IS_CHROMATIC_': false, '_PERF_PREFIX_': false, '_DATA_TRANSFER_DRIVE_FILE_': false, '_DATA_TRANSFER_DRIVE_FOLDER_': false, diff --git a/packages/frontend/.storybook/main.ts b/packages/frontend/.storybook/main.ts index 1d0ce5ab6..80628d9bc 100644 --- a/packages/frontend/.storybook/main.ts +++ b/packages/frontend/.storybook/main.ts @@ -32,6 +32,9 @@ const config = { rootDir: config.root ?? process.cwd(), }), ], + define: { + _IS_CHROMATIC_: true, + }, build: { target: [ 'chrome108', diff --git a/packages/frontend/@types/global.d.ts b/packages/frontend/@types/global.d.ts index c75748290..e91d341be 100644 --- a/packages/frontend/@types/global.d.ts +++ b/packages/frontend/@types/global.d.ts @@ -4,6 +4,7 @@ declare const _LANGS_: string[][]; declare const _VERSION_: string; declare const _ENV_: string; declare const _DEV_: boolean; +declare const _IS_CHROMATIC_: boolean; declare const _PERF_PREFIX_: string; declare const _DATA_TRANSFER_DRIVE_FILE_: string; declare const _DATA_TRANSFER_DRIVE_FOLDER_: string; diff --git a/packages/frontend/src/components/MkAnimBg.vue b/packages/frontend/src/components/MkAnimBg.vue index 5a5c427cf..6b42c158c 100644 --- a/packages/frontend/src/components/MkAnimBg.vue +++ b/packages/frontend/src/components/MkAnimBg.vue @@ -4,7 +4,6 @@