Closed hyperupcall closed 4 years ago
process.env.RDB_HOST
was part of the legacy code that signifies development environment. That’s was when SlugSurvival was running as one giant monolith. You can safely change that to some other sensible name 😅
Anyway, I will check it out soon. Again, thanks for the work!
I'm trying to see how to best integrate the new build system with CloudFlare's Workers as the frontend is running on CF's Workers.
from issue #22, this migrates the build system from browserify to webpack. this required to two / three main changes
.default
to anyrequire
'd vue single file components (commit 21a20bee911e5d6d39db5f579ea0aa82a2063e94)__ANALYTICS__
and__DRIFT__
placeholder values are resolved at build time (before webpack build process). (so resolving them was removed fromapp.js
, except in the special case whereprocess.env.RDB_HOST
is defined (i'm not sure if this is needed))app.js
). in summary,index.html
is processed as such: the startingindex.html
is atsrc/static/index.pre.html
, and the gulp taskstatic
processes it, and writes it tosrc/static/index.html
. webpack uses this, processes it, and writes it todist/index.html
. the gulp taskprod
copies this topublic
. i didn't want to add this complexity, but i think i had to, to enable webpack hmr (commit b98c6c19d08c99488deabec4bc60b2b0366fd08e)/fonts
route for the express server (which resolves to static directory/public/fonts
) (maybe there is a better fix i am not seeing?))i kept the existing gulp
js
andcss
pipelines intact, since it didn't seem necessary to rebundle them with webpackalso the
prod.js
bundle size decreased from 624kiB to 552kiBi might have missed something, but let me know if you have any questions, or if something looks off, some extra details are in the commit messages :smiley: