🧩 Plasmo Developers�PD
🧩 Plasmo Developers2y ago
31 replies
Avi

Dynamically load script

Based on https://docs.plasmo.com/quickstarts/with-google-analytics , I should be able to load https://developers.google.com/maps/documentation/javascript/examples/place-search#maps_place_search-typescript as well
I tied to do it in a CSUI Svelte component:
<script lang="ts">
  import "https://maps.googleapis.com/maps/api/js?key=$PLASMO_PUBLIC_API_KEY&libraries=places";

  console.log(google); // google is undefined
</script>
Plasmo Docs
Guide on how to use Google Analytics with a Manifest Version 3 browser extension
Quickstart with Google Analytics – Plasmo
Was this page helpful?