Skip to content

Production does not load components' styles #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nachokb opened this issue Sep 15, 2019 · 1 comment
Closed

Production does not load components' styles #1

nachokb opened this issue Sep 15, 2019 · 1 comment

Comments

@nachokb
Copy link
Owner

nachokb commented Sep 15, 2019

2 problems:

  • DEVELOPMENT MODE:
    • css pack is not loading: <%= stylesheet_pack_tag 'styles', media: 'all', 'data-turbolinks-track': 'reload' %> 😐
    • components' styles are loaded correctly 😄
    • not using extract_css, so styles are string in javascript and injected 😞

image

  • PRODUCTION MODE
    • css pack is loading 👌
    • components' styles are not loaded 😡
    • using extract_css, so styles are compiled in its own CSS file and loaded by stylesheet_pack_tag 😄

image

nachokb added a commit that referenced this issue Sep 15, 2019
All packs need to have both styles and javascript pack tags
@nachokb
Copy link
Owner Author

nachokb commented Sep 15, 2019

Fixed!

Lesson 1: all packs need to have their stylesheet_pack_tag AND application_pack_tag (why not call it pack_tag and call both then?)

image

nachokb added a commit that referenced this issue Sep 15, 2019
@nachokb nachokb closed this as completed Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant