Skip to content

feat(dev): allow all hosts to connect to dev server for --public - #707

Merged
danielroe merged 3 commits into
mainfrom
feat/public-hosts
Jan 28, 2025
Merged

feat(dev): allow all hosts to connect to dev server for --public#707
danielroe merged 3 commits into
mainfrom
feat/public-hosts

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This improves DX for dev server to allow all hosts to connect to the dev server when the --public flag is passed or a hostname that doesn't match ['localhost', '127.0.0.1', '::1'].

We could also consider printing a message to warn users of the potential issues with a public dev server.

@github-actions

github-actionsBot commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxi size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
54 → 535.67 MB → 5.67 MB (+235 B)+0.00%
Changeset
FileΔSize
src/utils/dev.ts📈 +548 B (+7.36%)7.27 kB → 7.81 kB
src/commands/dev.ts📉 -160 B (-2.11%)7.4 kB → 7.25 kB
src/commands/dev-child.ts📉 -153 B (-7.14%)2.09 kB → 1.94 kB
View detailed bundle breakdown

Added

No assets were added

Removed

AssetFile Size% Changed
shared/nuxi.CeDCJTol.mjs18.95 kB → 0 B (-18.95 kB)-100%

Bigger

AssetFile Size% Changed
chunks/index2.mjs909.09 kB → 928.04 kB (+18.95 kB)+2.08%
chunks/dev2.mjs69.1 kB → 69.63 kB (+548 B)+0.77%

Smaller

AssetFile Size% Changed
chunks/dev.mjs9.99 kB → 9.83 kB (-160 B)-1.56%
chunks/dev-child.mjs2.09 kB → 1.94 kB (-153 B)-7.14%

Unchanged

AssetFile Size% Changed
index.mjs188 B0%
chunks/prompt.mjs42.92 kB0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs805.49 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.34 kB0%
chunks/index3.mjs17.08 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs134.34 kB0%
chunks/index4.mjs1.24 kB0%
chunks/index5.mjs6.55 kB0%
chunks/index6.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/add2.mjs12.02 kB0%
chunks/search.mjs42.99 kB0%
chunks/index7.mjs5.87 kB0%
chunks/index8.mjs886.32 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
shared/nuxi.BqbbTtZ1.mjs76.16 kB0%
shared/nuxi.BX35bYtK.mjs804 B0%
shared/nuxi.C06cIqym.mjs294 B0%
shared/nuxi.DdI-vRyV.mjs1.54 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.jHNMu6i2.mjs1.34 kB0%
shared/nuxi.BwIereCt.mjs17.68 kB0%
shared/nuxi.CVCE_T29.mjs836 B0%
shared/nuxi.D0__QBAb.mjs14.64 kB0%
shared/nuxi.Cb8SV1Ml.mjs6.13 kB0%
shared/nuxi.WdkwsuT4.mjs8.87 kB0%
shared/nuxi.SEuYCQjN.mjs2.02 MB0%
shared/nuxi.E-ZsRS8r.mjs943 B0%
shared/nuxi.BgENdoyd.mjs1.76 kB0%
shared/nuxi.CDPIBJHk.mjs152.13 kB0%
shared/nuxi.DsJ8r8e5.mjs285.08 kB0%
shared/nuxi.ChFrgAY-.mjs5.71 kB0%
shared/nuxi.CDQkQpHL.mjs5.09 kB0%
shared/nuxi.BPuj-7ta.mjs42.89 kB0%

@github-actions

github-actionsBot commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxt-cli size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
2978.66 kB → 78.85 kB (+200 B)+0.25%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/utils/dev.ts📈 +548 B (+7.37%)7.26 kB → 7.8 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts📉 -195 B (-2.57%)7.4 kB → 7.21 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev-child.ts📉 -153 B (-7.12%)2.1 kB → 1.95 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/dev2.mjs7.26 kB → 7.8 kB (+548 B)+7.37%

Smaller

AssetFile Size% Changed
chunks/dev.mjs7.4 kB → 7.21 kB (-195 B)-2.57%
chunks/dev-child.mjs2.1 kB → 1.95 kB (-153 B)-7.12%

Unchanged

AssetFile Size% Changed
index.mjs200 B0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs5.21 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/add2.mjs11.83 kB0%
chunks/search.mjs2.94 kB0%
shared/cli.ZjQ19XGU.mjs5.48 kB0%
shared/cli.mEn9q49T.mjs804 B0%
shared/cli.BnJuNnzK.mjs294 B0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.DlcAx0De.mjs1.04 kB0%
shared/cli.Bc1MVia1.mjs1.23 kB0%
shared/cli.tKPzVzbf.mjs836 B0%
shared/cli.Bzv_ksqZ.mjs107 B0%
shared/cli.C935N1ss.mjs687 B0%

@github-actions

github-actionsBot commented Jan 28, 2025

Copy link
Copy Markdown
Contributor

Bundle Stats — create-nuxt-app size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
61.03 MB0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.01 kB0%
chunks/index.mjs70.29 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/prompt.mjs42.92 kB0%
chunks/satisfies.mjs43 kB0%
shared/create-nuxt-app.DGIhHoEU.mjs897.33 kB0%

@pkg-pr-new

pkg-pr-newBot commented Jan 28, 2025

Copy link
Copy Markdown

Open in Stackblitz

npm i https://pkg.pr.new/create-nuxt-app@707
npm i https://pkg.pr.new/nuxi@707
npm i https://pkg.pr.new/@nuxt/cli@707

commit: 77f3f4a

@danielroe
danielroe merged commit 5e021b5 into mainJan 28, 2025
@danielroe
danielroe deleted the feat/public-hosts branch January 28, 2025 21:45
@danielroedanielroe mentioned this pull request Jan 28, 2025
This was referenced Jan 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@danielroe@atinux