In case a Bigquery connection is not configured or the user wants to include their primer examples to the bundle we can add a failsafe on useBigQueryExamples.ts to check for a connection variable in the environment and decide whether fetching the examples or using the ones in the 2nd-level folder explore-assistant-examples.
This works because .env is being loaded already by Webpack and we can do conditional compilation since the environment variables are available at build time.
I had to comment out the .env_example file as a tradeof but this ensures examples are only included in the bundle if a BigQuery connection is not set. Plus this is probably the least intrusive solution.
In case a Bigquery connection is not configured or the user wants to include their primer examples to the bundle we can add a failsafe on
useBigQueryExamples.ts
to check for a connection variable in the environment and decide whether fetching the examples or using the ones in the 2nd-level folderexplore-assistant-examples
.This works because
.env
is being loaded already by Webpack and we can do conditional compilation since the environment variables are available at build time.I had to comment out the
.env_example
file as a tradeof but this ensures examples are only included in the bundle if a BigQuery connection is not set. Plus this is probably the least intrusive solution.