Skip to content

Commit 633b969

Browse files
committed
fix for next dev error logs
1 parent 3a235af commit 633b969

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.changeset/rare-roses-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@varlock/nextjs-integration": patch
3+
---
4+
5+
show error logs on first load

packages/integrations/nextjs/src/next-env-compat.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ export function loadEnvConfig(
297297
try {
298298
loadCount++;
299299
const varlockLoadedEnvStr = execSyncVarlock(`load --format json-full --env ${envFromNextCommand}`, {
300-
// in dev, there are 2 loads up front, so we dont show the first
301-
showLogsOnError: !dev || loadCount > 1,
300+
showLogsOnError: true,
302301
// in a build, we want to fail and exit, while in dev we can keep retrying when changes are detected
303302
exitOnError: !dev,
304303
env: initialEnv as any,

packages/varlock-website/src/content/docs/integrations/nextjs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Varlock provides a huge upgrade over the [default Next.js environment variable t
1616

1717
To integrate varlock into a Next.js application, you must use our [`@varlock/nextjs-integration`](https://www.npmjs.com/package/@varlock/nextjs-integration) package. This package provides a drop-in replacement for [`@next/env`](https://www.npmjs.com/package/@next/env), the internal package that handles .env loading, plus a small config plugin which injects our additional security features.
1818

19-
:::note[Turbopack not yet supported]
19+
:::note[Turbopack supported, but not fully]
2020
[Turbopack](https://nextjs.org/docs/app/api-reference/turbopack) does not yet provide a plugin system, so using the config plugin is not supported. You can use the `@next/env` override only, but you will not get the additional security features.
2121
:::
2222

0 commit comments

Comments
 (0)