diff --git a/packages/html-reporter/bundle.ts b/packages/html-reporter/bundle.ts
index 67bb7aa45d..7dd1c651e1 100644
--- a/packages/html-reporter/bundle.ts
+++ b/packages/html-reporter/bundle.ts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-import * as fs from 'fs';
-import * as path from 'path';
+import fs from 'fs';
+import path from 'path';
import type { Plugin, UserConfig } from 'vite';
export function bundle(): Plugin {
diff --git a/packages/html-reporter/playwright.config.ts b/packages/html-reporter/playwright.config.ts
index ec2ff3c42f..1e6cb8b8a3 100644
--- a/packages/html-reporter/playwright.config.ts
+++ b/packages/html-reporter/playwright.config.ts
@@ -16,6 +16,7 @@
import { devices, defineConfig } from '@playwright/experimental-ct-react';
import path from 'path';
+import url from 'url';
export default defineConfig({
testDir: 'src',
@@ -28,7 +29,7 @@ export default defineConfig({
ctViteConfig: {
resolve: {
alias: {
- '@web': path.resolve(__dirname, '../web/src'),
+ '@web': path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), '../web/src'),
},
}
},
diff --git a/packages/html-reporter/tsconfig.node.json b/packages/html-reporter/tsconfig.node.json
index df9b7a8a50..5ea435ac82 100644
--- a/packages/html-reporter/tsconfig.node.json
+++ b/packages/html-reporter/tsconfig.node.json
@@ -2,7 +2,9 @@
"compilerOptions": {
"composite": true,
"module": "esnext",
- "moduleResolution": "node"
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true
},
- "include": ["vite.config.ts", "bundle.ts"]
+ "include": ["playwright.config.ts", "vite.config.ts", "bundle.ts"]
}
diff --git a/packages/trace-viewer/tsconfig.node.json b/packages/trace-viewer/tsconfig.node.json
index df9b7a8a50..77fef63cae 100644
--- a/packages/trace-viewer/tsconfig.node.json
+++ b/packages/trace-viewer/tsconfig.node.json
@@ -2,7 +2,9 @@
"compilerOptions": {
"composite": true,
"module": "esnext",
- "moduleResolution": "node"
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true
},
- "include": ["vite.config.ts", "bundle.ts"]
+ "include": ["vite.config.ts", "vite.sw.config.ts", "bundle.ts"]
}
diff --git a/packages/trace-viewer/vite.config.ts b/packages/trace-viewer/vite.config.ts
index eaea0ee95b..13310ca0f7 100644
--- a/packages/trace-viewer/vite.config.ts
+++ b/packages/trace-viewer/vite.config.ts
@@ -17,7 +17,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { bundle } from './bundle';
-import * as path from 'path';
+import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
diff --git a/packages/trace-viewer/vite.sw.config.ts b/packages/trace-viewer/vite.sw.config.ts
index ece81d28e5..c0dba9f124 100644
--- a/packages/trace-viewer/vite.sw.config.ts
+++ b/packages/trace-viewer/vite.sw.config.ts
@@ -17,7 +17,7 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { bundle } from './bundle';
-import * as path from 'path';
+import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({