hyperstack-org / hyperstack-org/hyperstack

should `extract_css` be true?

Aperta
#286 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
discussion help wanted needs doc
Lingua principale
JavaScript
Stelle
538
Fork
41
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

In `config/webpacker.yml` the `extract_css` option is currently false unless in production, but this seems to break importing predefined styles.

Should it be true?

In the meantime if you are trying to include styles from an npm module (i.e. bootstrap) do the following:

1. create `app/javascript/packs/styles.js` file and import the style sheets you want.
2. add `<%= style_sheet_pack_tag 'styles' %>` to your layout files.
3. set `extract_css: true` in `config/webpacker.yml`

Currently trying to find an answer to why this is all necessary here: https://stackoverflow.com/questions/59009216/how-to-get-webpacker-to-load-css-if-extract-css-is-false

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.