feedback
This commit is contained in:
parent
d3a5569290
commit
530e6c06ac
|
|
@ -14,8 +14,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as fs from 'fs';
|
import fs from 'fs';
|
||||||
import * as path from 'path';
|
import path from 'path';
|
||||||
import type { Plugin, UserConfig } from 'vite';
|
import type { Plugin, UserConfig } from 'vite';
|
||||||
|
|
||||||
export function bundle(): Plugin {
|
export function bundle(): Plugin {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
import { devices, defineConfig } from '@playwright/experimental-ct-react';
|
import { devices, defineConfig } from '@playwright/experimental-ct-react';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import url from 'url';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: 'src',
|
testDir: 'src',
|
||||||
|
|
@ -28,7 +29,7 @@ export default defineConfig({
|
||||||
ctViteConfig: {
|
ctViteConfig: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@web': path.resolve(__dirname, '../web/src'),
|
'@web': path.resolve(path.dirname(url.fileURLToPath(import.meta.url)), '../web/src'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"module": "esnext",
|
"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"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"module": "esnext",
|
"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"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import { bundle } from './bundle';
|
import { bundle } from './bundle';
|
||||||
import * as path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import { bundle } from './bundle';
|
import { bundle } from './bundle';
|
||||||
import * as path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue