@skyvexsoftware/stratos-sdk 0.1.3 → 0.1.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.
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import * as fs from "fs";
|
|
19
19
|
import * as path from "path";
|
|
20
|
-
import react from "@vitejs/plugin-react";
|
|
21
20
|
import { UI_EXTERNALS } from "./externals.js";
|
|
22
21
|
import { serveExternals } from "./serve-externals.js";
|
|
23
22
|
import { stratosDevServer } from "./stratos-dev-server.js";
|
|
@@ -173,7 +172,6 @@ function createUIConfig(pluginDir, entry) {
|
|
|
173
172
|
return {
|
|
174
173
|
root: pluginDir,
|
|
175
174
|
plugins: [
|
|
176
|
-
{ ...react(), apply: "serve" },
|
|
177
175
|
serveExternals(),
|
|
178
176
|
stratosDevServer({ pluginDir }),
|
|
179
177
|
stratosExternals(),
|
|
@@ -188,6 +186,14 @@ function createUIConfig(pluginDir, entry) {
|
|
|
188
186
|
],
|
|
189
187
|
},
|
|
190
188
|
},
|
|
189
|
+
optimizeDeps: {
|
|
190
|
+
exclude: [
|
|
191
|
+
...UI_EXTERNALS,
|
|
192
|
+
"react/jsx-runtime",
|
|
193
|
+
"react/jsx-dev-runtime",
|
|
194
|
+
"react-dom/client",
|
|
195
|
+
],
|
|
196
|
+
},
|
|
191
197
|
build: {
|
|
192
198
|
outDir: path.resolve(pluginDir, "dist/ui"),
|
|
193
199
|
emptyOutDir: true,
|
|
@@ -59,7 +59,10 @@ export function stratosDevServer(options) {
|
|
|
59
59
|
function getDevUrl() {
|
|
60
60
|
const addr = server.httpServer?.address();
|
|
61
61
|
if (addr && typeof addr === "object") {
|
|
62
|
-
const host = addr.address === "::" ||
|
|
62
|
+
const host = addr.address === "::" ||
|
|
63
|
+
addr.address === "::1" ||
|
|
64
|
+
addr.address === "0.0.0.0" ||
|
|
65
|
+
addr.address === "127.0.0.1"
|
|
63
66
|
? "localhost"
|
|
64
67
|
: addr.address;
|
|
65
68
|
return `http://${host}:${addr.port}`;
|