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

feat(nuxi): support --dotenv for dev, build and preview commands - #7660

Merged
pi0 merged 10 commits into
nuxt:mainfrom
cpreston321:feat/nuxi-env-path
Sep 26, 2022
Merged

feat(nuxi): support --dotenv for dev, build and preview commands#7660
pi0 merged 10 commits into
nuxt:mainfrom
cpreston321:feat/nuxi-env-path

Conversation

@cpreston321

@cpreston321cpreston321 commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Issue: nuxt/nuxt#14963

❓ 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

Wanted to help with stubbing out and adding --dotenv to dev, preview and build but for build I would think this would be an override during build but I could not find and overrides so I left build out for now until I can learn the best way to override it.

  • nuxi dev
    • [Added][--dotenv] option - relative to rootDir defaults to rootDir
  • nuxi preview
    • [Added][--dotenv] option - relative to rootDir defaults to rootDir
  • nuxi build
    • [Added][--dotenv] option - relative to rootDir defaults to rootDir

I will update docs once I have more information!

Thanks 💚

📝 Checklist

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

@netlify

netlifyBot commented Sep 19, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commit4cbea56
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6330dafe670184000a421254
😎 Deploy Previewhttps://deploy-preview-7660--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cpreston321cpreston321 changed the title feat(nuxi): add --dotenv to dev & preview commandfeat(nuxi): add --dotenv to nuxi dev & nuxi previewSep 19, 2022
@pi0

pi0 commented Sep 20, 2022

Copy link
Copy Markdown
Member

Nice work! For build command you can pass dotenv option to the loadNuxt.

@cpreston321
cpreston321 marked this pull request as ready for review September 20, 2022 13:06
@cpreston321cpreston321 changed the title feat(nuxi): add --dotenv to nuxi dev & nuxi previewfeat(nuxi): add --dotenv to nuxi dev, nuxi preview & nuxi buildSep 20, 2022
@cpreston321

Copy link
Copy Markdown
ContributorAuthor

@pi0 Thanks for the response! I added it to nuxi build and updated docs accordingly

Comment threadpackages/nuxi/src/commands/dev.ts Outdated
@cpreston321cpreston321 changed the title feat(nuxi): add --dotenv to nuxi dev, nuxi preview & nuxi buildfeat(nuxi): stub --dotenv for nuxi dev, nuxi preview & nuxi buildSep 21, 2022
@pi0pi0 changed the title feat(nuxi): stub --dotenv for nuxi dev, nuxi preview & nuxi buildfeat(nuxi): support --dotenv for dev, build and preview commandsSep 26, 2022
pi0
pi0 approved these changes Sep 26, 2022

@pi0pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks <3

@pi0
pi0 merged commit 2e080c2 into nuxt:mainSep 26, 2022
@danielroedanielroe mentioned this pull request Oct 9, 2022
@cpreston321
cpreston321 deleted the feat/nuxi-env-path branch October 19, 2022 14:10
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@cpreston321@pi0@danielroe