Phoenix: Webpack/frontend assets

Created on 8 Jul 2018  路  6Comments  路  Source: phoenixframework/phoenix

Hi there. I have been slowly falling in love with Elixir and transitioning it using it as my backend language of choice. Before this switch though I was full stack javascript. I think that I can do a lot to help with the transition to webpack for the build pipeline. I don't know the best way to get involved but would love to help out in any way that I can!

Most helpful comment

Phoenix 1.4 will ship with webpack by default.

All 6 comments

Phoenix 1.4 will ship with webpack by default.

Yeah I am beyond excited for that decision. I just downloaded the installer from master and just thought the current webpack setup could use some tweaks

The webpack config is located at https://github.com/phoenixframework/phoenix/blob/0bdb5b001915e437c2d2cf1b77a1c532ce45cde2/installer/templates/phx_assets/webpack/webpack.config.js

We want the integration with webpack to be as minimal as possible and to behave in the same way brunch used to by default. That is dropping the assets in priv/static/js/app.js and priv/static/css/app.css

If you have specific ideas please open a PR. If you have an idea that involves a decent amount of work, I'd recommend opening an issue for discussion around the specific topic first to confirm it is something we'd want in the generators to save you implementing something that might not be merged.

Oh, I'm sorry. I'm not sure what happened but it turns I must have misunderstood your initial comment - you wanted to help out with the new webpack setup, not suggesting we switch to webpack.

Hi @skbolton! If you are familiar with webpack and JS frameworks in general and you would be willing to give us a hand, we would appreciate some help on the ExDoc project. You can see it also has a webpack setup in there, using Gulp, but we are stuck on Webpack 1 and we would probably benefit from a migration to a more recent webpack which can better optimize the generated JS.

We could probably even get rid of Gulp, although for now I would focus on the webpack side of things.

Thanks!

@josevalim I would love to help out on that project. I will pull this conversation to that repo

Was this page helpful?
0 / 5 - 0 ratings