50
stisch
2y

npm install -g create-react-app
create-react-app hello-world
du -sh ./hello-world/node_modules

253 MB

ಠ_ಠ

Comments
  • 6
    JS is not the one to blame here...
  • 5
    Try Vue mate 👌
  • 3
    also
    ls -l node_modules/ | wc -L
  • 0
    ya but my website output compressed is 13MB though that modules folder is huge :\
  • 1
    devDependencies !== productionDependencies

    Webpack is a enourmous dependencie hole, but this helps you to generate smaler dist files. Probably also the reason the new app is so big. And vue cli does not include webpack into projects thats why its smaller...
  • 2
    @gitpush your output should not contain a node_modules folder. Use a bundler.
  • 1
    @Hammster Exactly, my website folder is big, but luckily output is only 13MB
  • 1
    @gitpush thats big, do you use many assets like images? And did you use a optimizer on them? Normally you can save up 50% and more from that. Also did you try to gzip the files, since all browser are capable to read gzipped files. Normally this are another 20%.
  • 0
    @Hammster I honestly didn't, how do I do these things? Any tutorial I can follow?
  • 1
    @gitpush sure, i just need to know if you use webpack, gulp or no building tool
  • 3
  • 0
    @Hammster I use webpack, I guess :S

    I used create-react-app and I think they do use webpack for it
  • 1
    @chrisrhymes Thanks man I'm checking it out now
  • 4
    At first I was hyped to React and Angular. Yo FB/Google created this, you gotta use this.

    Well well, what do you know? I ended up using VueJS. There must be a reason on why it is Taylor Otwell's preference 😉
  • 1
    @gitpush that laracast is what i would have send you too, episode 13 goes into image optimization. There are more techniques out there but it will get you covered.

    For gzipping check out compression-webpack-plugin

    If you dont use react in later projects i can recommand parcel.js for bundling optimizing and building since it needs no configuration at all. It does all the fany stuff including compiling webassembly and new also supports Vue even though it has minor issues with the component tag, maybe it also something for you @Devnergy
  • 0
    @chrisrhymes I've watched two vids on Webpack and now watching Vue videos, do you recommend signing up or only those series are the good ones?
  • 0
    @Hammster Thanks man, I'm checking out those videos, and will try out what you recommended. My website doesn't include that much images, so I'm guessing 13MB is too much
  • 2
    @gitpush Yes mate sign up even for 1 month only. Definitely worth it cheers! 👊 😎 👍
  • 1
    @gitpush up to you whether to sign up as lots available for free, but more advanced videos you need to pay for. The discussions forum is really good too.
  • 1
    @chrisrhymes @Devnergy Thanks guys, So far I'm enjoying those videos, happy you lead me there, I used to use StackSkills, it is good but not all videos are clear :\
  • 2
    @gitpush cool bro. Right now I'm saving up for Chris Fidao's expensive courses (Shipping Docker and Scaling Laravel) 😖
  • 1
    @Devnergy If you are new to Docker, try their docs, I learned how to create a swarm, services, clustering my containers and at least the basic stuff. Though it is too much reading but at least for free :\
  • 2
    @gitpush thanks mate. Yup pretty new to Docker and Laradock but I'm using it at work but some other dev already set it up so I want to know how the details work. I'll study it later. I'm quite lazy at reading to study. I prefer studying by watching tutorial videos. Sounds lazy 😂
  • 1
    @Devnergy They have these tutorials if you want:

    https://docker.com/products/...

    Though I never watched them, don't know how good they are
  • 1
    laravel + vuejs = <3
  • 0
    Yes, development files are too huge, but production is too small, and incrementing by your dependencies. React + Laravel/Lumen <3
  • 0
    The real question that I still to find its answer is:

    React JS or Vue?

    It is like Kotlin or Java, I still need to know what vue has to offer but if someone knows I'd appreciate a summary of this or that
  • 2
    @gitpush both are good. I prefere Vue because it does not use JSX as default.

    What matters more is that you understand the stuff happening in the back of both frameworks. Stuff like virtual DOM, states, mutability how and when stuff rerenders.

    Otherwise you end up with some framework hype that has no foundation ;)
  • 1
    @Hammster I see, guess I have along way to go before I reach the point where I decide which is better for my case :/
    Cuz till now to me it is same as react
  • 1
    Vue js for the win!!
Add Comment