https://serverless-stack.com/ logo
#help
Title
# help
d

Daniel Gato

05/31/2022, 9:31 AM
I have a StaticSite that is a simple HTML page. I’m defining 2 environment variables on my StaticSite and I have
disablePlaceholder: true
set. What would be the easiest to get those variables replaced on sst start and sst deploy? Isn’t there a native way for SST to replace it. The documentation mentions
{{ MY_VAR }}
but I tried and it doesn’t get replaced.
t

thdxr

05/31/2022, 2:20 PM
this does work for me hm
Copy code
replaceValues: [
      {
        files: "index.html",
        search: "{{ IFRAME_URL }}",
        replace: props.replace.iframe_url,
      },
Copy code
<body>
    <iframe
      style="width: 100%; height: 100vh"
      class="frame"
      src="{{ IFRAME_URL }}"
      allow="autoplay" />
  </body>
it won't work on sst start
but it will on sst deploy
3 Views