@nuasite/cli 0.13.0 → 0.13.3

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/index.js CHANGED
@@ -276,22 +276,21 @@ if (canProxyDirectly && command && ["build", "dev", "preview"].includes(command)
276
276
  break;
277
277
  case "dev":
278
278
  case "preview": {
279
- const options = {
280
- root: process.cwd(),
281
- integrations: [agentsSummary()],
282
- vite: {
283
- server: {}
284
- }
285
- };
279
+ const server = {};
286
280
  for (let i = 0;i < args.length; i++) {
287
281
  if (args[i] === "--port" && args[i + 1]) {
288
- options.vite.server.port = parseInt(args[i + 1] ?? "", 10);
282
+ server.port = parseInt(args[i + 1], 10);
289
283
  i++;
290
284
  } else if (args[i] === "--host" && args[i + 1]) {
291
- options.vite.server.host = args[i + 1];
285
+ server.host = args[i + 1];
292
286
  i++;
293
287
  }
294
288
  }
289
+ const options = {
290
+ root: process.cwd(),
291
+ integrations: [agentsSummary()],
292
+ server
293
+ };
295
294
  const runner = command === "dev" ? dev : preview;
296
295
  runner(options).catch((error) => {
297
296
  console.error("Error:", error);