-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cover gitignored env files in docs and examples #3270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
🟢 CI successful 🟢Thanks |
I left a comment on the vercel preview ( currently on mobile). Otherwise looks good :) |
@@ -1,5 +1,6 @@ | |||
{ | |||
"$schema": "https://turbo.build/schema.json", | |||
"globalDependencies": ["**/.env.*local"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mehulkar
Hi
I found that this setting seems to slow down tasks very much.
Tested with turbo 1.9.6 with basic example:
pnpm dlx create-turbo@1.9.6
? Where would you like to create your turborepo? ./my-turborepo
? Which package manager do you want to use? pnpm
Then, run pnpm lint
(with cache == full turbo)
It takes 300-400ms.
pnpm lint
(omit)
Tasks: 3 successful, 3 total
Cached: 3 cached, 3 total
Time: 366ms >>> FULL TURBO
If I remove the globalDependencies setting:
pnpm lint
(omit)
Tasks: 3 successful, 3 total
Cached: 3 cached, 3 total
Time: 55ms >>> FULL TURBO
It is turbo!
If I make the following changes, it is also very fast.
(As much as when I delete globalDependencies.)
- "globalDependencies": ["**/.env.*local"],
+ "globalDependencies": ["apps/**/.env.*local"],
So I think it may be better to limit the scope of glob.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it’s not a great solution for exactly this reason. You can specify all known files yourself or use a more limited glob.
@nathanhammond is also working on a feature to make this a top level configuration
This is another take on #2298, adding a special section for dotenv , since it is such a common way of loading environment variables.