framework icon indicating copy to clipboard operation
framework copied to clipboard

feat(nuxi): stub `--dotenv` for `nuxi dev`, `nuxi preview` & `nuxi build`

Open cpreston321 opened this issue 3 years ago • 3 comments

🔗 Linked issue

Issue: #7646

❓ Type of change

  • [ ] 📖 Documentation (updates to the documentation or readme)
  • [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [X] 👌 Enhancement (improving an existing functionality like performance)
  • [X] ✨ 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

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

cpreston321 avatar Sep 19 '22 21:09 cpreston321

Deploy Preview for nuxt3-docs ready!

Name Link
Latest commit 4cbea561920c3e1090cc5d62d75ed82ab9438b6e
Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6330dafe670184000a421254
Deploy Preview https://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.

netlify[bot] avatar Sep 19 '22 21:09 netlify[bot]

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

pi0 avatar Sep 20 '22 09:09 pi0

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

cpreston321 avatar Sep 20 '22 13:09 cpreston321