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

On custom element 'link css' does not build css. #375

Closed
8 of 9 tasks
wildwind123 opened this issue Mar 20, 2024 · 2 comments
Closed
8 of 9 tasks

On custom element 'link css' does not build css. #375

wildwind123 opened this issue Mar 20, 2024 · 2 comments

Comments

@wildwind123
Copy link

wildwind123 commented Mar 20, 2024

Related plugins

Describe the bug

I write in template link css like this, for web component doc

<template>
  <link rel="stylesheet" href="/src/style.css" />
  <div class="red">
    <h1>red</h1>
  </div>
</template>

this work in dev mode, but does not work after build, css is empty

On documentation web component support external css via link
doc in mozilla

Reproduction

https://stackblitz.com/edit/vitejs-vite-6fypuw?file=src%2Fstyle.css,src%2Fmain.ts,src%2FApp.ce.vue,index.html&terminal=dev

Steps to reproduce

npm install
npm run dev

red text is red

npm run build
npm run preview

red text is black, should be red

System Info

System:
    OS: Linux 6.5 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 10.35 GB / 15.36 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 21.4.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 8.11.0 - ~/.local/share/pnpm/pnpm
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.4 
    vite: ^5.2.0 => 5.2.0

Used Package Manager

npm

Logs

No response

Validations

@wildwind123
Copy link
Author

I don't know this is bug or not released feature. I create issue in vuejs/core

vuejs/core#10561

@wildwind123
Copy link
Author

vuejs/core#10561
found a solution

@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant