hyperstack-org / hyperstack-org/hyperstack

should `extract_css` be true?

Aberta
#286 2 comentários 0 reações 0 responsáveis Ver no GitHub
discussion help wanted needs doc
Linguagem predominante
JavaScript
Estrelas
538
Forks
41
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.