From 4807325d3600a92036b24c6150646f9e9000b021 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 20 Oct 2023 13:51:46 +0200 Subject: [PATCH] Fix warning --- package-lock.json | 11 +++++++++++ package.json | 1 + vite.config.ts | 10 ---------- vitest.config.ts | 26 ++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 vitest.config.ts diff --git a/package-lock.json b/package-lock.json index f422377..a5e145f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "classnames": "^2.3.1", "connected-react-router": "^6.9.2", "date-fns": "^2.28.0", + "deep-object-diff": "^1.1.9", "file-saver": "^2.0.5", "marked": "^4.1.0", "mousetrap": "1.6.5", @@ -8811,6 +8812,11 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/deep-object-diff": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/deep-object-diff/-/deep-object-diff-1.1.9.tgz", + "integrity": "sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==" + }, "node_modules/deepmerge-ts": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", @@ -25139,6 +25145,11 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "deep-object-diff": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/deep-object-diff/-/deep-object-diff-1.1.9.tgz", + "integrity": "sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==" + }, "deepmerge-ts": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz", diff --git a/package.json b/package.json index a7d3221..9d1880d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "classnames": "^2.3.1", "connected-react-router": "^6.9.2", "date-fns": "^2.28.0", + "deep-object-diff": "^1.1.9", "file-saver": "^2.0.5", "marked": "^4.1.0", "mousetrap": "1.6.5", diff --git a/vite.config.ts b/vite.config.ts index c71b8ad..0757d43 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,16 +13,6 @@ export default defineConfig({ build: { chunkSizeWarningLimit: 2000, }, - - test: { - globals: true, - - browser: { - name: 'chrome', // browser name is required, - - slowHijackESM: false - }, - }, plugins: [react({})], }); diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..31d67a2 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,26 @@ +import path from 'path'; +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config/ +export default defineConfig({ + resolve: { + alias: { + '@app': path.resolve(__dirname, './src/') + } + }, + + define: { + __REACT_DEVTOOLS_GLOBAL_HOOK__: { isDisabled: true } + }, + + test: { + globals: true, + + browser: { + name: 'chrome', // browser name is required, + + slowHijackESM: false + }, + }, +});