mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
ci: start devServer before test running to avoid tests timeout (#11297)
This commit is contained in:
@@ -4,7 +4,7 @@ import { readFileSync } from 'node:fs';
|
||||
import { Path, ProjectRoot } from '@affine-tools/utils/path';
|
||||
import { Repository } from '@napi-rs/simple-git';
|
||||
import HTMLPlugin from 'html-webpack-plugin';
|
||||
import once from 'lodash-es/once';
|
||||
import { once } from 'lodash-es';
|
||||
import type { Compiler, WebpackPluginInstance } from 'webpack';
|
||||
import webpack from 'webpack';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { PerfseePlugin } from '@perfsee/webpack';
|
||||
import { sentryWebpackPlugin } from '@sentry/webpack-plugin';
|
||||
import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
|
||||
import CopyPlugin from 'copy-webpack-plugin';
|
||||
import compact from 'lodash-es/compact';
|
||||
import { compact } from 'lodash-es';
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import webpack from 'webpack';
|
||||
@@ -227,7 +227,7 @@ export function createWebpackConfig(
|
||||
},
|
||||
{
|
||||
test: /\.(ttf|eot|woff|woff2)$/,
|
||||
type: 'asset/resource',
|
||||
type: IN_CI ? 'asset/inline' : 'asset/resource',
|
||||
},
|
||||
{
|
||||
test: /\.txt$/,
|
||||
@@ -313,7 +313,7 @@ export function createWebpackConfig(
|
||||
{} as Record<string, string>
|
||||
),
|
||||
}),
|
||||
buildConfig.isAdmin
|
||||
buildConfig.isAdmin && flags.mode !== 'production'
|
||||
? null
|
||||
: new CopyPlugin({
|
||||
patterns: [
|
||||
@@ -360,7 +360,11 @@ export function createWebpackConfig(
|
||||
directory: pkg.workspace.getPackage('@affine/core').join('public')
|
||||
.value,
|
||||
publicPath: '/',
|
||||
watch: true,
|
||||
watch: !IN_CI,
|
||||
staticOptions: {
|
||||
immutable: IN_CI,
|
||||
maxAge: '1d',
|
||||
},
|
||||
},
|
||||
],
|
||||
proxy: [
|
||||
|
||||
Reference in New Issue
Block a user