diff --git a/package-lock.json b/package-lock.json index e0fe6dfd..339e08cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ }, "engines": { "node": "^20.0.0", - "npm": "^9.0.0" + "npm": "^10.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index ed1ce7cb..3c06eb7e 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,6 @@ }, "engines": { "node": "^20.0.0", - "npm": "^9.0.0" + "npm": "^10.0.0" } } diff --git a/vite.config.ts b/vite.config.ts index 2660aaa3..7b6dc9bd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -23,7 +23,6 @@ const translations = Object.fromEntries(readdirSync('./l10n') ] })) - export default createLibConfig({ index: 'lib/index.ts', }, { @@ -31,9 +30,4 @@ export default createLibConfig({ replace: { LOCALES: JSON.stringify(translations) }, - config: { - test: { - environment: 'jsdom', - } - } }) diff --git a/vitest.config.ts b/vitest.config.ts index dbd135f4..769d9f27 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -3,6 +3,11 @@ import config from './vite.config' export default async (env) => { const cfg = await config(env) // remove the node externals plugin that interferes with vitest - cfg.plugins = cfg.plugins!.filter((plugin) => plugin && "name" in plugin && plugin.name !== 'node-externals') - return cfg + cfg.plugins = cfg.plugins!.filter((plugin) => plugin && 'name' in plugin && plugin.name !== 'node-externals') + return { + ...cfg, + test: { + environment: 'jsdom', + }, + } }