Production build does not include component styles
I maintainer di solito rispondono entro 1 giorno
@tanner-reits ci sta già lavorando.
Dal 14/3/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
3.0.0
Current Behavior
I am writing one component with the following configuration.
@Component({
tag: 'mpsv-feedback',
styleUrl: 'feedback.css',
shadow: true,
})
I have a definition in the component style itself.
:host {
font-family: "Roboto", sans-serif;
color: var(--gov-color-secondary);
font-size: 16px !important;
margin: 0;
padding: 0;
}
:host * {
box-sizing: border-box;
}
During development everything is fine and styles are generated in the component.

When I build the component, the styles do not appear after the component is generated.

They are clogged in the component chunk itself.

Expected Behavior
I expect the same behavior as in the dev environment.
The component will generate the styles it is assigned.
System Info
System: node 18.15.0
Plaform: darwin (21.6.0)
CPU Model: Apple M1 Pro (8 cpus)
Compiler: .../node_modules/@stencil/core/compiler/stencil.js
Build: 20230228172721
Stencil: 3.1.0 🍕
TypeScript: 4.9.5
Rollup: 2.42.3
Parse5: 7.1.2
Sizzle: 2.42.3
Terser: 5.16.4
Steps to Reproduce
- Install a new project
- Add custom styles
- Set shaddow to true
- Run npm run build
- Upload esm modules to server and try to call a component
Code Reproduction URL
https://github.com/zvitek/webcomponent-styles
Additional Information
- Lingua principale
- TypeScript
- Stelle
- 13.2k
- Fork
- 865
- Merge medio
- 2g 16h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stenciljs/core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug(mock-doc): `Element.toggleAttribute()` is missing, so components that use it fail during SSRApertatriage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Stencil FOUC styles should use @layer to avoid cascade conflicts with React 19Forse già presa @johnjenkins l’ha presa 231 giorni fa. ApertaStencil v5
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
stenciljs/core#7016 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stenciljs/core
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·