SolidJSS
SolidJSโ€ข3y agoโ€ข
9 replies
Bersaelor

Is there a polyfills.ts for `solid-start`? Or is there a way of modyfing the produced `index.html` ?

So, in the aws amplify framework there is a common bug, which all frameworks have to fix somehow:
https://github.com/aws-amplify/amplify-js/issues/678

global is not defined

One common solution is to add:
    <script>
      // aws-sdk requires global to exist
      var global = global || window;
    </script>

to the
index.html
, which is how I fixed this in good old solid-js. With solid-start we don't have an
index.html
any more and this variable needs to exist before the page is rendered (putting it into root.tsx is not enough.)

Another common solution angular/svelte devs seem to use is to add the fix to a /src/polyfills.ts. Do we have something comparable in solid-start ?
Was this page helpful?