Skip to content

Commit 4408656

Browse files
authored
chore: update vite config to remove deplrecation warnings with CJS fe… (#497)
## Description Update config for vitest to disable deprecated usage of CJS implementation of fetch. Changed deprecated format for deps also. ## Type of change <!-- Check the appropriate options that apply to this PR --> - [x] Other (please describe): fix deprecations ## Testing `pnpm t` You won't wee deprecation warnings from vitest ## Related Issues Relates to #494 ## Checklist <!-- Verify that you have completed the following before requesting review --> - [x] My code follows the project's style guidelines - [x] I have added tests that prove my fix/feature works - [x] All tests pass locally and in CI - [x] I have updated documentation as needed - [x] CI/CD checks pass - [ ] I have included screenshots for protocol screens (if applicable) - [ ] For security-related features, I have included links to related information <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Update `vite.config.mts` to remove deprecation warnings by moving `deps` under `server`. > > - **Configuration Update**: > - Renamed `vite.config.ts` to `vite.config.mts`. > - Moved `deps` configuration under `server` in `vite.config.mts` to address deprecation warnings related to CJS fetch implementation. > - **Testing**: > - Running `pnpm t` will no longer show deprecation warnings from vitest. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=solana-foundation%2Fexplorer&utm_source=github&utm_medium=referral)<sup> for beafd40. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent 5f688b5 commit 4408656

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vite.config.ts renamed to vite.config.mts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ export default defineConfig({
2626
coverage: {
2727
provider: 'v8'
2828
},
29-
deps: {
30-
inline: ['@noble', 'change-case', '@react-hook/previous']
29+
server: {
30+
deps: {
31+
inline: ['@noble', 'change-case', '@react-hook/previous']
32+
},
3133
},
3234
environment: 'jsdom',
3335
globals: true,

0 commit comments

Comments
 (0)