rasengan 1.0.0-beta.4 → 1.0.0-beta.5
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.
- package/lib/config/index.d.ts +5 -4
- package/lib/config/index.js +11 -1
- package/lib/config/type.d.ts +4 -0
- package/package.json +1 -1
package/lib/config/index.d.ts
CHANGED
|
@@ -7,11 +7,12 @@ import { type AppConfig } from "./type.js";
|
|
|
7
7
|
export declare const defineConfig: (loadedConfig: AppConfig) => {
|
|
8
8
|
reactStrictMode: boolean;
|
|
9
9
|
server: {
|
|
10
|
-
development
|
|
11
|
-
port
|
|
10
|
+
development: {
|
|
11
|
+
port: number;
|
|
12
|
+
open: true;
|
|
12
13
|
};
|
|
13
|
-
production
|
|
14
|
-
hosting
|
|
14
|
+
production: {
|
|
15
|
+
hosting: import("./type.js").HostingStrategy;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
vite: {
|
package/lib/config/index.js
CHANGED
|
@@ -21,10 +21,20 @@ export const defineConfig = (loadedConfig) => {
|
|
|
21
21
|
alias: vite?.resolve?.alias || [],
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
|
+
// Define default values for server config coming from loadedConfig.server
|
|
25
|
+
const defaultServerConfig = {
|
|
26
|
+
development: {
|
|
27
|
+
port: server?.development?.port || undefined,
|
|
28
|
+
open: server?.development?.open || true,
|
|
29
|
+
},
|
|
30
|
+
production: {
|
|
31
|
+
hosting: server?.production?.hosting || "custom",
|
|
32
|
+
}
|
|
33
|
+
};
|
|
24
34
|
try {
|
|
25
35
|
const config = {
|
|
26
36
|
reactStrictMode: reactStrictMode === undefined ? true : reactStrictMode,
|
|
27
|
-
server,
|
|
37
|
+
server: defaultServerConfig,
|
|
28
38
|
vite: {
|
|
29
39
|
plugins: defaultViteConfig.plugins,
|
|
30
40
|
optimizeDeps: {
|
package/lib/config/type.d.ts
CHANGED