Hi jnm and thanks a lot for your response!
Thanks for the clarification on ES6 and JSX, now it works.
I have not managed to sort out the double compile though …
So no matter what I do I keep getting the same double build, one when docker-compose build kpi
and one when docker-compose up
. I cannot figure out why and this is what I end up with in my kpi container:
root@kpi:/srv/static/compiled#
-rw-r--r-- 1 www-data root 4271122 Mar 26 11:47 app-d257e8cc804e5fd3d173.js
-rw-r--r-- 1 www-data root 4270367 Mar 26 11:47 app-f6b162c1d88e99745df5.js
What is also very odd, is that I end up with a mess of webpack-stats.json files.
kpi:/srv/src/kpi/webpack-stats.json
: points to the most recent version of the app (compiled when docker-compose up
)
kpi:/srv/webpack-stats.json
: points to the inital version, compiled when docker-compose build
.
AND,
/srv/src/kpi/webpack-stats.json
should be a symlink according to the kpi Dockerfile:
ln -s "${WEBPACK_STATS_PATH}" webpack-stats.json
… but it is not
and once up and running, I have the same output on my kpi container:
root@kpi:/srv/src/kpi# echo $KPI_PREFIX
/
root@kpi:/srv/src/kpi# python docker/check_kpi_prefix_outdated.py && echo 'Great!' Great!
I wonder if that is not also leading to further issues down the line cause when I try to reload or hot reload anything, my browser keep loading an older version of the app that is not even in webpack-stats.json
. I looked at everything, such as WEBPACK_LOADER
and {% render_bundle 'app' 'js' %}
but for some reason it does not pick the version in /srv/src/kpi/webpack-stats.json
. It sometimes load the first version that was loaded at docker-compose up
… sometimes picks a version from devServer … it is completely random and mysterious
Any help would be much appreciated and thanks again