Skip to content

Commit

Permalink
chore(web): use env var with prefix for cesium ion token (#1197)
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Oct 25, 2024
1 parent 61f707c commit cfbf54b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ function config(): Plugin {
? { cesiumIonAccessToken: remoteCesiumIonToken }
: {}),
// If Cesium version becomes outdated, you can set the Ion token as an environment variables here.
// ex: `CESIUM_ION_ACCESS_TOKEN="ION_TOKEN" yarn start`
// ex: `REEARTH_WEB_CESIUM_ION_ACCESS_TOKEN="ION_TOKEN" yarn start`
// ref: https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L6-L7
...(process.env.CESIUM_ION_ACCESS_TOKEN
? { cesiumIonAccessToken: process.env.CESIUM_ION_ACCESS_TOKEN }
...(envs.REEARTH_WEB_CESIUM_ION_ACCESS_TOKEN
? { cesiumIonAccessToken: envs.REEARTH_WEB_CESIUM_ION_ACCESS_TOKEN }
: {}),
...readEnv("REEARTH_WEB", {
source: envs
Expand Down

0 comments on commit cfbf54b

Please sign in to comment.