docs: add FAQ for passing config options with ES6 imports#1008
Merged
Conversation
Adds a dedicated FAQ entry explaining how to pass config options when using ES6 imports. This comes up a lot (motdotla#880) and the current README covers the hoisting pitfall well, but doesn't explicitly show the practical workarounds for passing options like `quiet: true`. Changes: - Link from the ES6 section to the new FAQ - Add 'How do I specify config options with ES6 import?' FAQ - 3 common approaches with code examples - Quick reference table for config options Closes motdotla#880
Owner
|
Thank you! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1008 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 468 468
=========================================
Hits 468 468 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there! 👋
This PR adds a dedicated FAQ entry to address a question that keeps coming up (see #880) — how do you pass config options like
quiet: true,path, ordebugwhen usingimport 'dotenv/config'?I ran into this myself a while back and noticed the README explains the ES6 hoisting pitfall really well, but doesn't explicitly walk through the practical options for passing config in ESM. Figured I'd open a small docs PR to help the next person who stumbles on it. 😊
What's added:
Hope this is helpful! Happy to tweak wording or formatting if anything looks off.
Closes #880