dwyl / learn-phoenix-framework

:fire: Phoenix is the web framework without compromise on speed, reliability or maintainability! Don't settle for less. :rocket:
648 stars 45 forks source link

Phoenix can compile static assets incorrectly in dev environment #77

Open samhstn opened 7 years ago

samhstn commented 7 years ago

When compiling static assets in a Phoenix application in dev the static assets can be compiled in a different order to your brunch config (the order for your local assets) (the static assets seem to be compiled in an alphabetical order).

This can lead to css overwriting other css and so a different dev site.

Phoenix sadly won't read the brunch ordering of files and it doesn't seem configurable 😢

One way to get around this is to ensure that the order for brunch compilation is in alphabetical order:

        before: [
          "web/static/css/app.css",
          "web/static/tachyons-word-break.min.css",
          "web/static/tachyons.min.css"
        ] // concat app.css last

It would be good to know if other people have found this problem and if there are better ways around this