You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to propose a change to the default Webpacker configuration.
From what I've seen in my experience, the option extract_css should be true also for test environment, so that the latter is consistent with production one. This brings two advantages:
you are able to catch errors with stylesheet_pack_tag before going to production. We almost released a broken build of our website due to this difference between test and production environment, and it was passing all feature tests despite the problem!
if you are doing feature tests with Capybara, you won't get all the CSS and its source maps printed out to the console when an assertion on the content of the page fails
Therefore my proposal is to have extract_css defaulted to true, with the exception of development environment. I'll take care to create the PR if this proposal gets accepted.
PS: What's the rationale behind extract_css being defaulted to false in dev environment? I've read somewhere that is made "to better support CSS hot-reloading" but I couldn't understand if that's a pre-requisite for hot-reloading or just a nice-to-have.
The text was updated successfully, but these errors were encountered:
I want to propose a change to the default Webpacker configuration.
From what I've seen in my experience, the option extract_css should be true also for test environment, so that the latter is consistent with production one. This brings two advantages:
stylesheet_pack_tag
before going to production. We almost released a broken build of our website due to this difference between test and production environment, and it was passing all feature tests despite the problem!Therefore my proposal is to have extract_css defaulted to true, with the exception of development environment. I'll take care to create the PR if this proposal gets accepted.
PS: What's the rationale behind extract_css being defaulted to false in dev environment? I've read somewhere that is made "to better support CSS hot-reloading" but I couldn't understand if that's a pre-requisite for hot-reloading or just a nice-to-have.
The text was updated successfully, but these errors were encountered: