mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
chore(tools): disable hmr by default (#9286)
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
"@clack/prompts": "^0.9.0",
|
||||
"@napi-rs/simple-git": "^0.1.19",
|
||||
"@perfsee/webpack": "^1.13.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
||||
"@sentry/webpack-plugin": "^2.22.7",
|
||||
"@vanilla-extract/webpack-plugin": "^2.3.15",
|
||||
"autoprefixer": "^10.4.20",
|
||||
|
||||
@@ -4,7 +4,6 @@ import { getBuildConfig } from '@affine-tools/utils/build-config';
|
||||
import { ProjectRoot } from '@affine-tools/utils/path';
|
||||
import type { Package } from '@affine-tools/utils/workspace';
|
||||
import { PerfseePlugin } from '@perfsee/webpack';
|
||||
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
||||
import { sentryWebpackPlugin } from '@sentry/webpack-plugin';
|
||||
import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
|
||||
import CopyPlugin from 'copy-webpack-plugin';
|
||||
@@ -207,11 +206,6 @@ export function createWebpackConfig(
|
||||
transform: {
|
||||
react: {
|
||||
runtime: 'automatic',
|
||||
refresh: flags.mode === 'development' && {
|
||||
refreshReg: '$RefreshReg$',
|
||||
refreshSig: '$RefreshSig$',
|
||||
emitFullSignatures: true,
|
||||
},
|
||||
},
|
||||
useDefineForClassFields: false,
|
||||
decoratorVersion: '2022-03',
|
||||
@@ -288,11 +282,7 @@ export function createWebpackConfig(
|
||||
plugins: compact([
|
||||
IN_CI ? null : new webpack.ProgressPlugin({ percentBy: 'entries' }),
|
||||
flags.mode === 'development'
|
||||
? new ReactRefreshWebpackPlugin({
|
||||
overlay: false,
|
||||
esModule: true,
|
||||
include: /\.tsx$/,
|
||||
})
|
||||
? null
|
||||
: // todo: support multiple entry points
|
||||
new MiniCssExtractPlugin({
|
||||
filename: `[name].[contenthash:8].css`,
|
||||
@@ -343,7 +333,7 @@ export function createWebpackConfig(
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
allowedHosts: 'all',
|
||||
hot: true,
|
||||
hot: false,
|
||||
liveReload: true,
|
||||
client: {
|
||||
overlay: process.env.DISABLE_DEV_OVERLAY === 'true' ? false : undefined,
|
||||
|
||||
Reference in New Issue
Block a user