Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(nuxi): load .env file before starting dev server - #6119

Merged
pi0 merged 3 commits into
mainfrom
fix/dev-env
Jul 25, 2022
Merged

fix(nuxi): load .env file before starting dev server#6119
pi0 merged 3 commits into
mainfrom
fix/dev-env

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14365

❓ 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 like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

We load .env for nuxi preview and even later in the process, so it seems reasonable to read it in before starting the dev server, allowing host/port to be defined there when developing.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe self-assigned this Jul 25, 2022
@danielroe
danielroe requested a review from pi0July 25, 2022 11:41
@netlify

netlifyBot commented Jul 25, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit3ca201f
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62de857dce67ee000840ec11

@danielroedanielroe added bug Something isn't working cli 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Jul 25, 2022
Comment threadpackages/nuxi/src/commands/dev.ts Outdated
@danielroe
danielroe requested a review from pi0July 25, 2022 11:59
pi0
pi0 approved these changes Jul 25, 2022
@pi0pi0 changed the title fix(nuxi): read .env file before starting dev serverfix(nuxi): load .env file before starting dev serverJul 25, 2022
@pi0
pi0 merged commit 40defd9 into mainJul 25, 2022
@pi0
pi0 deleted the fix/dev-env branch July 25, 2022 12:01
@pi0pi0 mentioned this pull request Aug 5, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't workingcli🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nuxi does not load .env file for NUXT_HOST and NUXT_PORT

2 participants

@danielroe@pi0