Skip to content

Commit 93e87de

Browse files
committed
fix: align source map config
1 parent 4fefc20 commit 93e87de

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

farm.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { defineConfig } from "@farmfe/core";
22

3+
const isProduction = process.env.NODE_ENV === "production";
4+
35
export default defineConfig({
46
compilation: {
7+
sourcemap: !isProduction,
58
presetEnv: false,
69
},
710
plugins: ["@farmfe/plugin-react"],

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@
5454
"build:webpack": "cross-env NODE_ENV=production webpack build --mode production",
5555
"start:rspack": "cross-env NODE_ENV=development rspack serve",
5656
"start:rspack:lazy": "cross-env NODE_ENV=development LAZY=true rspack serve",
57-
"start:rspack:incremental": "cross-env NODE_ENV=development INCREMENTAL=true rspack serve",
5857
"build:rspack": "cross-env NODE_ENV=production rspack build",
5958
"start:rsbuild": "rsbuild dev",
6059
"start:rsbuild:lazy": "cross-env LAZY=true rsbuild dev",
61-
"start:rsbuild:incremental": "cross-env INCREMENTAL=true rsbuild dev",
6260
"build:rsbuild": "rsbuild build",
6361
"start:turbopack": "next dev --turbo",
6462
"build:turbopack": "next build",

rspack.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ReactRefreshPlugin from "@rspack/plugin-react-refresh";
66
const isProduction = process.env.NODE_ENV === "production";
77

88
export default defineConfig({
9+
devtool: isProduction ? false : undefined,
910
entry: {
1011
main: "./src/index.tsx",
1112
},

0 commit comments

Comments
 (0)