This commit is contained in:
Max Schmitt 2024-07-09 23:21:56 +02:00
parent d3a5569290
commit 530e6c06ac
6 changed files with 14 additions and 9 deletions

View file

@ -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 {

View file

@ -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'),
},
}
},

View file

@ -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"]
}

View file

@ -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"]
}

View file

@ -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({

View file

@ -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({