fix(cdp): isolate extension builds and keep oopif auto-attach

This commit is contained in:
Tommy D. Rossi
2026-01-27 16:05:15 +01:00
parent a8412343e1
commit 67d017237e
8 changed files with 224 additions and 17 deletions
+6 -3
View File
@@ -1,5 +1,5 @@
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';
import { defineConfig } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
@@ -13,6 +13,9 @@ if (process.env.TESTING) {
defineEnv['import.meta.env.TESTING'] = 'true';
}
// Allow tests to build per-port extension outputs to avoid parallel run conflicts.
const outDir = process.env.PLAYWRITER_EXTENSION_DIST || 'dist';
export default defineConfig({
plugins: [
viteStaticCopy({
@@ -48,7 +51,7 @@ export default defineConfig({
],
build: {
outDir: 'dist',
outDir,
emptyOutDir: false,
minify: false,
rollupOptions: {