add concurrent pages test

This commit is contained in:
Tommy D. Rossi
2025-11-22 12:28:21 +01:00
parent 2f1c2c781a
commit c658c153b2
5 changed files with 280 additions and 648 deletions
+8 -2
View File
@@ -1,4 +1,3 @@
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { defineConfig } from 'vite';
@@ -7,6 +6,11 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const defineEnv: Record<string, string> = {};
if (process.env.TESTING) {
defineEnv['import.meta.env.TESTING'] = 'true';
}
export default defineConfig({
plugins: [
viteStaticCopy({
@@ -26,6 +30,7 @@ export default defineConfig({
]
})
],
build: {
lib: {
entry: resolve(__dirname, 'src/background.ts'),
@@ -35,5 +40,6 @@ export default defineConfig({
outDir: 'dist',
emptyOutDir: false,
minify: false
}
},
define: defineEnv
});