Commit e0648b8
committed
fix: use env from cachedConfig when offlineEnv is set
This changeset modifies the `dev` command's behavior when the
`--offlineEnv` command is set: Previously, passing `offlineEnv` would
ignore any environment variable data from the cached configuration
file by setting `env` data to an empty object before passing it around.
The unintended consequence of this is that environment variable data
set via the config file is ignored when running Preview Servers.
Environment variable data is not passed to edge functions, and only
build-time variables are passed to functions.
With this change, we'll only default to an empty object when
`cachedConfig.env` is not set. (I don't know if this is a realistic
scenario, but I'm doing it this way to lower the risk of this change.)1 parent efb5a3f commit e0648b8
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 623 | + | |
627 | 624 | | |
628 | 625 | | |
629 | 626 | | |
| |||
0 commit comments