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

<link rel="stylesheet"> elements generated in webc:for are removed for bundling but not part of the bundle #188

Open
ghost opened this issue Jul 24, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 24, 2023

Compiling <link webc:for="href of stylesheets" rel="stylesheet" :href="href"> shows the css files are found, the element is removed from the HTML output, but the default bundle is missing the CSS.

<template webc:if="stylesheets" webc:nokeep>
  <link webc:for="href of stylesheets" rel="stylesheet" :href="href">
</template>

^ This is also not working... same issue; HTML is excised, but CSS is not bundled.

<script webc:type="js">
  if (Array.isArray(stylesheets)) {
    stylesheets.map(href => `<link rel="stylesheet" href="${href}">`).join("");
  }
</script>

^ Edit: This works... isn't this also implicitly a template? I don't know why this would work and not the other.

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

0 participants