0
votes

I try to replace brunch with webpack, so that I can develop with hot-module-replacement. Furthermore I would have access to more sophisticated build tools.

All Tutorials out there describe Phoenix 1.2.x and Webpack 1.x, where both of them are outdated.

Thanks for any advice and or clue

Tech Stack

  • Elixir: 1.4.2
  • Phoenix: 1.3.0-rc
  • Brunch: 2.10.8

Ressources

already checked

1
It should not really depend on the version of webpack, so do it for phoenix 1.2 and migrate phoenix. Nobody will describe you here the whole process for the version that was released yesterday.Aleksei Matiushkin
I will post the answer shorty and yes I got two responses alteady on elixir forum. cheersradosch

1 Answers

1
votes

Sorry if I don't describe the process because I would say that the links to posted already describes it very well.

But if you need some example and something ready to use check this https://github.com/yordis/phoenix_assets_webpack

It's actually using phoenix 1.3 generator instead of 1.2. is This repo meant to be modify per project, normally contains the default setups for any project using jquery but it's very helpful for the starting point.

For React

  • Remove jquery from npm as well as any present on the webpack config.
  • Install react and react-dom using npm install react react-dom --save
  • Modify the entry point file with the react code.