-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: define:vars breaking on hoisted scripts with --experimental-static-build
#2505
Comments
Verified. This may be a current limitation, but I’m not certain and I can see in your excellent example that there is no warning flag. |
apart from "variable is undefined" the console is empty, i found this by checking files via the sources tab on devtools |
Thanks, I'm currently taking a look. This is true of styles as well, not hadn't implemented define:vars behind that flag yet. |
May keep the issue stale for now to avoid duplicates and link the future PR later then ? |
Not sure I follow but we can keep this issue open if thats what you mean. |
Sorry, I meant to leave the issue open for the moment while waiting for an implementation in order to avoid duplicates |
Fixed by #2511, should go out in the next (prerelease most likely) |
What version of
astro
are you using?0.22.20
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
Any defined variable in
define:vars
is scrapped from rendered page when--experimental-static-build
is set totrue
and hoist is set also totrue
Works if hoist is set to
false
or--experimental-static-build
is set tofalse
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xrbux4?file=src%2Fcomponents%2FTour.astro&on=stackblitz
The text was updated successfully, but these errors were encountered: