hyperstack-org/hyperstack

should `extract_css` be true?

Open

#286 建立於 2019年11月23日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (43 fork)batch import
discussionhelp wantedneeds doc

倉庫指標

Star
 (531 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南