/phoenix_snowpack_01

Phoenix & Snowpack instead of Webpack

Primary LanguageElixir

Credits

The first version (see commit messages) is based on https://www.richardtaylor.dev/articles/replacing-webpack-with-snowpack-in-a-phoenix-application

I didn't like loading the Phoenix's JS from a CDN, so I went on trying.

The latest version is based on https://gist.github.com/ohmree/bb701a5e44b6c258a38bd0e497455d17

Thanks to dbernheisel and ohmree phoenixframework/phoenix#4160 author of https://gist.github.com/ohmree/bb701a5e44b6c258a38bd0e497455d17

PhoenixSnowpack01

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with npm install inside the assets directory
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more