I’m using Webpack to compile my javascript assets into a single file:
/priv/static/js/app.js
And it works fine locally and on Heroku. The problem is that every time someone writes new javascript, the app.js file is radically different and that means almost every time we pull there’s a merge conflict in this compiled javascript file.
This leads me to believe we’re not doing things the right way.
I think what needs to happen is I need to remove the end result app.js file from my Git repository, and only keep the source JS files in the repo.
The assets should probably be built on-deploy to Heroku as well.
Does anyone have experience with Phoenix/Webpack for this problem?
I’m hosting it on a Heroku free-tier dyno with the Elixir Heroku buildpack:
The project is using Webpack 3, and basically right now it compiled everything down into a single app.js file located in:
/priv/static/js/app.js
So right now I have this compiled app.js in the code repository, but I want to remove it and compile it on deploy so the JS is compiled on the Heroku side.