@nativescript/vite 0.0.1-alpha.4 → 0.0.1-alpha.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.
- package/dist/configuration/base.js +11 -2
- package/package.json +1 -1
|
@@ -48,7 +48,16 @@ export const baseConfig = ({ mode }) => {
|
|
|
48
48
|
const isDevMode = targetMode === "development";
|
|
49
49
|
const debug = !!process.env.DEBUG || isDevMode;
|
|
50
50
|
const hmrActive = isDevMode && !!cliFlags.hmr;
|
|
51
|
-
|
|
51
|
+
let platform = cliFlags.platform;
|
|
52
|
+
if (cliFlags.android) {
|
|
53
|
+
platform = "android";
|
|
54
|
+
}
|
|
55
|
+
else if (cliFlags.ios) {
|
|
56
|
+
platform = "ios";
|
|
57
|
+
}
|
|
58
|
+
else if (cliFlags.visionos) {
|
|
59
|
+
platform = "visionos";
|
|
60
|
+
}
|
|
52
61
|
if (debug) {
|
|
53
62
|
console.log("--------------");
|
|
54
63
|
// console.log("Vite config mode:", mode);
|
|
@@ -258,7 +267,7 @@ export const baseConfig = ({ mode }) => {
|
|
|
258
267
|
? {
|
|
259
268
|
// Expose dev server to local network so simulator or device can connect
|
|
260
269
|
host: process.env.NS_HMR_HOST ||
|
|
261
|
-
(platform === "android" ? "
|
|
270
|
+
(platform === "android" ? "0.0.0.0" : "localhost"),
|
|
262
271
|
// Use a stable port so the device URL remains correct
|
|
263
272
|
port: 5173,
|
|
264
273
|
strictPort: true,
|