Closed jeanparpaillon closed 8 years ago
Well, it does not really depends on me, node project are often super heavy with node_modules (dependencies require other dependencies...). OCCinterface needs some dependencies because it is not a "simple" frontend (like an HTML page...), but a complete app ! I'll check what I can do but I am not sure I can do way better :/
At least, you can remove server-side deps (maybe in a specific frontend-only mode ?) And maybe the problem comes from the build tool ? gulp, grunt or other instead of npm ?
I'm working on similar in technology (react.js, webpack, etc), but much more consequent in term of pages and components, projects where size is at max 1/3rd from this
Concrete issues are:
For the user the download size is not 2.8MB, it is ~280kB (look at firebug) for bundle.js. With --production flag on npm install, we can go down to 116MB. Removing server side (express) : 114 MB. (nearly nothing to gain seeing the work needed to change the project). We'll look at it later, but I am quite pessimistic.
I managed to reduce to ~77MB. Next improvement could let us go down to 55M.
:+1: You can do it ;)
du -hs deps/erocci_frontend/node_modules/
53M deps/erocci_frontend/node_modules/
Does it seems acceptable? If yes, you can close :)
Nice :)
When built as erocci frontend, OCCInterface pulls a lot of unneeded dependancies (server side, I suppose).
frontend mode should get rid of server side deps (and maybe some others).
Reducing deps implies:
From a fresh install and build:
-> problems of maintainability / security...
Unacceptable weight for a simple frontend: