test: change ct-vite projects to type: module (#34662)

This commit is contained in:
Max Schmitt 2025-02-06 23:11:06 +01:00 committed by GitHub
parent 34d9d4fc33
commit 8accb0ad1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 15 deletions

View file

@ -2,6 +2,7 @@
"name": "ct-react-vite", "name": "ct-react-vite",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc && vite build", "build": "tsc && vite build",
@ -9,16 +10,16 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"react": "^18.2.0", "react": "^19.0.0",
"react-dom": "^18.2.0", "react-dom": "^19.0.0",
"react-router-dom": "^6.6.1" "react-router-dom": "^7.1.5"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^18.0.26", "@types/react": "^19.0.8",
"@types/react-dom": "^18.0.10", "@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.2.1", "@vitejs/plugin-react": "^4.2.1",
"msw": "^2.3.0", "msw": "^2.3.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^5.2.8" "vite": "^6.1.0"
} }
} }

View file

@ -15,7 +15,8 @@
*/ */
import { defineConfig, devices } from '@playwright/experimental-ct-react'; import { defineConfig, devices } from '@playwright/experimental-ct-react';
import { resolve } from 'path'; import path from 'path';
import { fileURLToPath } from 'url';
export default defineConfig({ export default defineConfig({
testDir: 'tests', testDir: 'tests',
@ -30,7 +31,7 @@ export default defineConfig({
}, },
resolve: { resolve: {
alias: { alias: {
'@': resolve(__dirname, './src'), '@': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src'),
} }
} }
} }

View file

@ -1,6 +1,7 @@
{ {
"name": "ct-vue-vite", "name": "ct-vue-vite",
"version": "0.0.0", "version": "0.0.0",
"type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@ -12,10 +13,10 @@
"vue-router": "^4.1.5" "vue-router": "^4.1.5"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.2.0", "@vitejs/plugin-vue": "^5.2.1",
"@vue/tsconfig": "^0.5.1", "@vue/tsconfig": "^0.7.0",
"typescript": "5.6.2", "typescript": "~5.7.2",
"vite": "^5.2.8", "vite": "^6.1.0",
"vue-tsc": "^2.0.21" "vue-tsc": "^2.2.0"
} }
} }

View file

@ -15,7 +15,8 @@
*/ */
import { defineConfig, devices } from '@playwright/experimental-ct-vue'; import { defineConfig, devices } from '@playwright/experimental-ct-vue';
import { resolve } from 'path'; import path from 'path';
import { fileURLToPath } from 'url';
export default defineConfig({ export default defineConfig({
testDir: 'tests', testDir: 'tests',
@ -27,7 +28,7 @@ export default defineConfig({
ctViteConfig: { ctViteConfig: {
resolve: { resolve: {
alias: { alias: {
'@': resolve(__dirname, './src'), '@': path.resolve(path.dirname(fileURLToPath(import.meta.url)), './src'),
} }
} }
} }