I'd need to use production-like compilation settings, but in my development environment.
That seems hard given this statement of yours:
:style - This option is not supported. This is determined by the Rails environment. It's :expanded only on development, otherwise it's :compressed.
My understanding is that the notion of development is hardcoded.
I tried to create a new environment (development_alt) with production-like Rails config, to no avail. The emitted css is still not as compressed as when compiling the assets with RAILS_ENV=production.
Why I need this
The emitted CSS should be smaller than 50KB to be AMP-compliant, so I stop receiving false alarms when running its validator. This is a nuisance in development and predictably could be a problem in CI.
Bypassed the issue by always using the mentioned environment (development_alt), setting it as the default one in config/boot.rb, instead of using it just for compilation
What
I'd need to use production-like compilation settings, but in my development environment.
That seems hard given this statement of yours:
My understanding is that the notion of
development
is hardcoded.I tried to create a new environment (
development_alt
) with production-like Rails config, to no avail. The emitted css is still not as compressed as when compiling the assets withRAILS_ENV=production
.Why I need this
The emitted CSS should be smaller than 50KB to be AMP-compliant, so I stop receiving false alarms when running its validator. This is a nuisance in development and predictably could be a problem in CI.
Cheers - Victor