Skip to content

Commit

Permalink
feat(options development): add option for dev path
Browse files Browse the repository at this point in the history
comment in for local development
  • Loading branch information
MatsJohansen87 committed Jun 12, 2024
1 parent 15f30ca commit 9c7e089
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/demo/src/AppCCP.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
});
// VITE_TARGET_ENVIRONMENT should be set by the ci pipeline
const optionsFilePath =
import.meta.env.VITE_TARGET_ENVIRONMENT === "production"
? "options-ccp-prod.json"
: "options-ccp-demo.json";
let optionsFilePath: string = "";
if (import.meta.env.VITE_TARGET_ENVIRONMENT === "production") {
optionsFilePath = "options-ccp-prod.json";
} else if (import.meta.env.VITE_TARGET_ENVIRONMENT === "staging") {
optionsFilePath = "options-ccp-demo.json";
}
// comment in for development
// optionsFilePath = "options-dev.json";
fetch(optionsFilePath)
.then((response) => response.json())
Expand Down

0 comments on commit 9c7e089

Please sign in to comment.