Skip to content

fix(dev): automatically set allowedHosts + origin w/ --host - #704

Merged
danielroe merged 3 commits into
mainfrom
fix/allowed-hosts
Jan 26, 2025
Merged

fix(dev): automatically set allowedHosts + origin w/ --host#704
danielroe merged 3 commits into
mainfrom
fix/allowed-hosts

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#30725

❓ 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 automatically sets the new allowedHosts vite option when used with an explicit --host

@github-actions

github-actionsBot commented Jan 25, 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
2977.87 kB → 78.62 kB (+764 B)+0.96%
Changeset
FileΔSize
home/runner/work/cli/cli/packages/nuxi/src/commands/dev-child.ts📈 +349 B (+19.40%)1.76 kB → 2.1 kB
home/runner/work/cli/cli/packages/nuxi/src/commands/dev.ts📈 +415 B (+5.79%)7 kB → 7.4 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/dev.mjs7 kB → 7.4 kB (+415 B)+5.79%
chunks/dev-child.mjs1.76 kB → 2.1 kB (+349 B)+19.40%

Smaller

No assets were smaller

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/dev2.mjs7.26 kB0%
chunks/add2.mjs11.79 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 25, 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%

@github-actions

github-actionsBot commented Jan 25, 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
545.67 MB → 5.67 MB (+764 B)+0.01%
Changeset
FileΔSize
src/commands/dev-child.ts📈 +349 B (+19.45%)1.75 kB → 2.09 kB
src/commands/dev.ts📈 +415 B (+5.79%)7 kB → 7.4 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

AssetFile Size% Changed
chunks/dev.mjs9.58 kB → 9.99 kB (+415 B)+4.23%
chunks/dev-child.mjs1.75 kB → 2.09 kB (+349 B)+19.45%

Smaller

No assets were smaller

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/index2.mjs909.09 kB0%
chunks/dev2.mjs69.1 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.mjs11.98 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.CeDCJTol.mjs18.95 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%

@pkg-pr-new

pkg-pr-newBot commented Jan 25, 2025

Copy link
Copy Markdown

Open in Stackblitz

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

commit: b2bef6f

Comment threadpackages/nuxi/src/commands/dev-child.ts Outdated
@danielroe
danielroe merged commit e56dab7 into mainJan 26, 2025
@danielroe
danielroe deleted the fix/allowed-hosts branch January 26, 2025 20:24
@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.

HMR broken with custom domain since Vite v5.4.12 / v6

2 participants

@danielroe@schirrel