Elixir Phoenix 1.6 Esbuild + SCSS

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • esbuild

    An installer for esbuild (by phoenixframework)

  • Initially I just copied and pasted all the snippets thoughtlessly and one issue occurred. Because I use both phoenixframework/esbuild and CargoSense/dart_sass and they both output the CSS build result to the same file priv/static/assets/app.css, which means they keep on overriding that same file.

  • Bootstrap

    The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

  • One day I was trying to upgrade one of my Phoenix 1.5 apps to Phoenix 1.6. In that app, I customize Bootstrap styles using SCSS. I want to talk about what I found and stumbled on when setting up SCSS.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • dart_sass

    An installer for sass powered by Elixir Mix

  • # config/config.exs ... # Configure esbuild (the version is required) config :esbuild, version: "0.14.1", default: [ args: [ "js/app.js", "--bundle", "--target=es2016", "--outdir=../priv/static/assets", "--external:/fonts/*", "--external:/images/*" ], cd: Path.expand("../assets", __DIR__), env: %{"NODE_PATH" => Path.expand("../deps", __DIR__)} ] # https://github.com/CargoSense/dart_sass config :dart_sass, version: "1.44.0", default: [ args: ["scss/index.scss", "scss/index.css"], cd: Path.expand("../assets", __DIR__) ] ...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts