You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Minor Changes
#16342dedd7 Thanks @tenphi! - Add a scripts prop to Preview for demos that run your own library code.
List files from the site's public directory, such as ["/demo/button.js"];
Cookbook inlines them as classic scripts, in order, before javascript, so the
preview stays in its opaque-origin sandbox and also works in astro dev, astro preview, and offline, where a <script src> request from the frame
fails. View source shows each file as a <script src> tag, and a missing path
or one outside the public directory fails the build. Authored javascript that
contains </script> no longer ends the preview's script early.