[bug]:
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- css, react, typescript
- Ambito
- frontend
Direzione di ricerca
Start with admin/src/components/MyComponent.tsx and its imported style.css, then reproduce the issue using yarn run watch:link, yalc add strapi-plugin-name, and yarn run develop. Inspect the built plugin and Strapi Admin UI to determine why the CSS is present in dist but not applied. Done means the custom-style rules from style.css are loaded and visible in the Admin Panel.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What version of @strapi/sdk-plugin are you using?
-Strapi V5
-@strapi/[email protected]
[email protected]
What's Wrong?
I'm trying to load a style.css file to customize some elements in my Strapi plugin, but the file is not being rendered or loaded in the DOM.
I've created a component with an associated CSS file and imported it into my .tsx file. When I build the project, both files are included in the dist folder, but the styles are not applied in the Strapi admin panel.
Do you have any suggestions on how I can properly load my CSS in Strapi?
To Reproduce
- Create a com1ponent with a CSS file
Add a MyComponent.tsx file inside the admin/src/components folder.
Add a style.css file inside the same folder.
Import the CSS file in the component
- Import css
import "./style.css";
const MyComponent = () => {
return <div className="custom-style">This is my component</div>;
};
export default MyComponent;
Ensure the CSS file is included in the build output
3/Ensure the CSS file is included in the build output
Run "yarn run watch:link" in the plugin repository to watch for changes.
4.Run Strapi and check the Admin UI
In a separate Strapi project, install the plugin via yalc add strapi-plugin-name.
Start Strapi with "yarn run develop".
Navigate to the plugin interface in the Strapi Admin Panel.
Observe that the styles from style.css are not applied.
Expected Behaviour
The style.css file should be loaded and applied to the component in the Strapi Admin Panel.
- Lingua principale
- TypeScript
- Stelle
- 24
- Fork
- 13
- Merge medio
- 5g 3h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 strapi/sdk-plugin
-
Difficoltà 4/5 Mezza giornata Idoneità per principianti 15/100
strapi/sdk-plugin#244 ·
I maintainer di solito rispondono entro 6 giorni
-
[bug]: build ignores exports file names and package.json#type, breaking "type": "module" pluginsForse già presa @unrevised6419 l’ha presa 43 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
strapi/sdk-plugin#242 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
strapi/sdk-plugin#241 ·
I maintainer di solito rispondono entro 6 giorni
-
[feat]: build a subset of bundles with --bundle, for per-bundle task cachingForse già presa @unrevised6419 l’ha presa 51 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
strapi/sdk-plugin#238 ·
I maintainer di solito rispondono entro 6 giorni
-
[bug]: When building with latest sdk-plugin version, I loose sub folders typesForse di nuovo libera @jhoward1994 l’ha presa 247 giorni fa e non c’è nessuna pull request aperta. Apertaissue: bug
strapi/sdk-plugin#115 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di strapi/sdk-plugin
Issue simili
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument pageApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AOSSIE-Org/DebateAI#801 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ci: repo has no GitHub Actions workflow, so pushes and pull requests are never built or testedApertaagents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Add: BOM CineApertaapproved check:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno