bug: No .env.example in some templates
See original GitHub issueProvide environment information
System: OS: macOS 12.0.1 CPU: (8) arm64 Apple M1 Memory: 92.91 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Describe the bug
I noticed when I generate a new project, an .env.example
file is not always included. For example if you create a project and select either no additional packages or just trpc, you don’t get the example env file. Not sure if this is expected behaviour but i would assume there is always a potential use case for .env files regardless of which additional packages you install.
I realise that its super easy to create an env file but the docs refer to this example file and figured it would be nice to have across all template options.
To reproduce
Run npx create-t3-app
, select all defaults except just select trpc in the additional packages section.
Additional information
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
I don’t think we should introduce a prompt for everything. Ship a sensible default, and if people want the opposite they can create/delete the file.
I think there’s always a possibility you could need env vars regardless of the additional packages installed so I see no harm in adding an example. If no example is included then I think it might be worth mentioning it in the docs as that’s what confused me in the first place. An alternative could also be to just include an example in the docs for when someone goes looking for it?