Skip to content
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

WebC: Using getBundle() in a <style> or <script> tag always empty, but fine when used in, say, <div> #85

Open
anghelos opened this issue Jun 27, 2023 · 0 comments

Comments

@anghelos
Copy link

anghelos commented Jun 27, 2023

When trying to output the bundled CSS or JS in a .webc layout, the resulting tag is returned empty. I've tested that getBundle() outputs the proper code when used in an html tag other than <style> or <script>, however.

Edit: getBundleFileUrl() also works properly.

Example:

<script @raw="getBundle('js')" webc:keep></script>
<div @raw="getBundle('js')"></div>

Results in:

<script></script>
<div>(the proper javascript for the current page)</div>

I've tried troubleshooting by storing getBundle('js') to a variable in a webc:setup script (no change), replacing getBundle('js') with other text (works), as well as using webc:raw instead of webc:keep. I can't for the life of me figure out what I'm doing wrong.

I am using chained layouts, but from what I see that issue has been resolved (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant