-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: automatic dev mode detection (#1106)
- Loading branch information
1 parent
92e8fdf
commit 15868e3
Showing
4 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
uploadthing: patch | ||
--- | ||
|
||
fix automatic dev mode detection |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 4cadc4dd7e95da967da5b897ba8d20dae25bf7c1..2c742f6da291d5f66aed0033ff5dc1ea2a6f12d4 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -1068,9 +1068,9 @@ async function writeDefaultTsconfig(tsConfigPath) { | ||
/** | ||
* @return {Record<string, string>} env { 'process.env.<key>': '<value>' } | ||
*/ function getDefinedInlineVariables(envs, parsedExportCondition) { | ||
- if (!envs.includes('NODE_ENV')) { | ||
- envs.push('NODE_ENV'); | ||
- } | ||
+ // if (!envs.includes('NODE_ENV')) { | ||
+ // envs.push('NODE_ENV'); | ||
+ // } | ||
const envVars = envs.reduce((acc, key)=>{ | ||
const value = process.env[key]; | ||
if (typeof value !== 'undefined') { | ||
@@ -1087,11 +1087,11 @@ async function writeDefaultTsconfig(tsConfigPath) { | ||
return acc; | ||
}, new Set()); | ||
// For development and production convention, we override the NODE_ENV value | ||
- if (exportConditionNames.has('development')) { | ||
- envVars['process.env.NODE_ENV'] = JSON.stringify('development'); | ||
- } else if (exportConditionNames.has('production')) { | ||
- envVars['process.env.NODE_ENV'] = JSON.stringify('production'); | ||
- } | ||
+ // if (exportConditionNames.has('development')) { | ||
+ // envVars['process.env.NODE_ENV'] = JSON.stringify('development'); | ||
+ // } else if (exportConditionNames.has('production')) { | ||
+ // envVars['process.env.NODE_ENV'] = JSON.stringify('production'); | ||
+ // } | ||
if (exportConditionNames.has('edge-light')) { | ||
envVars['EdgeRuntime'] = JSON.stringify('edge-runtime'); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.