This commit is contained in:
parent
ea3ada64c9
commit
4363d73139
2 changed files with 3 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { defineConfig, devices } from '@playwright/test';
|
import { defineConfig, devices } from '@playwright/test';
|
||||||
|
|
||||||
const port = 4173;
|
const port = 4173;
|
||||||
const baseURL = `https://127.0.0.1:${port}`;
|
const baseURL = `http://127.0.0.1:${port}`;
|
||||||
const isCi = Boolean(process.env.CI);
|
const isCi = Boolean(process.env.CI);
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
@ -13,12 +13,10 @@ export default defineConfig({
|
||||||
reporter: isCi ? [['list'], ['html', { open: 'never' }]] : 'list',
|
reporter: isCi ? [['list'], ['html', { open: 'never' }]] : 'list',
|
||||||
use: {
|
use: {
|
||||||
baseURL,
|
baseURL,
|
||||||
ignoreHTTPSErrors: true,
|
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
},
|
},
|
||||||
webServer: {
|
webServer: {
|
||||||
command: `npm run build && npm run preview -- --host 127.0.0.1 --port ${port}`,
|
command: `npm run build && npm run preview -- --host 127.0.0.1 --port ${port}`,
|
||||||
ignoreHTTPSErrors: true,
|
|
||||||
reuseExistingServer: false,
|
reuseExistingServer: false,
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
url: baseURL,
|
url: baseURL,
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ import { defineConfig } from 'vitest/config';
|
||||||
const cssTargets = browserslistToTargets(browserslist());
|
const cssTargets = browserslistToTargets(browserslist());
|
||||||
const esbuildTargets = browserslistToEsbuild();
|
const esbuildTargets = browserslistToEsbuild();
|
||||||
|
|
||||||
export default defineConfig(({ command }) => ({
|
export default defineConfig(({ command, isPreview }) => ({
|
||||||
plugins: [viteSingleFile(), ...(command === 'serve' ? [basicSsl()] : [])],
|
plugins: [viteSingleFile(), ...(command === 'serve' && !isPreview ? [basicSsl()] : [])],
|
||||||
css: {
|
css: {
|
||||||
transformer: 'lightningcss',
|
transformer: 'lightningcss',
|
||||||
lightningcss: {
|
lightningcss: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue