rwsdk 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,8 +6,12 @@ import { externalModules } from "./constants.mjs";
|
|
|
6
6
|
import { ssrBridgeWrapPlugin } from "./ssrBridgeWrapPlugin.mjs";
|
|
7
7
|
export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clientFiles, serverFiles, clientEntryPoints, esbuildOptions, }) => ({
|
|
8
8
|
name: "rwsdk:config",
|
|
9
|
-
config: async (
|
|
9
|
+
config: async (config, { command }) => {
|
|
10
10
|
const mode = process.env.NODE_ENV;
|
|
11
|
+
// context(justinvdm, 2026-05-06): Only set a sourcemap default if the user
|
|
12
|
+
// hasn't already configured it in their vite config. This lets users opt in
|
|
13
|
+
// or out explicitly while still providing a sensible mode-aware default.
|
|
14
|
+
const sourcemap = config.build?.sourcemap ?? (mode === "development");
|
|
11
15
|
const workerConfig = {
|
|
12
16
|
resolve: {
|
|
13
17
|
conditions: [
|
|
@@ -67,7 +71,7 @@ export const configPlugin = ({ silent, projectRootDir, workerEntryPathname, clie
|
|
|
67
71
|
logLevel: silent ? "silent" : "info",
|
|
68
72
|
build: {
|
|
69
73
|
minify: mode !== "development",
|
|
70
|
-
sourcemap
|
|
74
|
+
sourcemap,
|
|
71
75
|
},
|
|
72
76
|
define: {
|
|
73
77
|
"process.env.NODE_ENV": JSON.stringify(mode),
|