Vite in 100 Seconds

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Vite is a JavaScript build tool that makes it faster and easier to build web applications. It's similar to tools like Webpack, but relies on modern browser features like ES Modules to simplify and speed-up the build process.
    #javascript #webdev #100SecondsOfCode
    🔗 Resources
    Vite Docs vitejs.dev
    Vite SSR Plugin vite-plugin-ss...
    Learn more about JS Bundlers • Module Bundlers Explai...
    🔥 Get More Content - Upgrade to PRO
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    🎨 My Editor Settings
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
    🔖 Topics Covered
    - What is Vite.js?
    - Vite vs Webpack
    - Who created Vite?
    - How does Vite work?
    - Module Bundlers in JavaScript

Комментарии • 583

  • @mariosebastian6480
    @mariosebastian6480 2 года назад +2380

    can you do a video that explains server side rendering vs client side rendering vs static site regeneration vs incremental generation? Static sites vs client rendered sites are easy to understand, but the in between of all the watering/hydration generations are confusing.

    • @lahcencodery
      @lahcencodery 2 года назад +33

      Wish more likes to make this comment on top as I my self know these kind of stuff but want to see it on 🔥 🚢

    • @MrFeliks912
      @MrFeliks912 2 года назад +7

      Fireship is so awesome, I can't wait to look at it. Visual applications are exactly what we're building right now, and yet we don't know which stack to choose...

    • @ChaoticNeutralMatt
      @ChaoticNeutralMatt 2 года назад +1

      Honestly this was confusing but I finally got what I was working on working with some help from several fireship videos.

    • @eddiesimon326
      @eddiesimon326 2 года назад +1

      Yes please

    • @himanshutripathi7441
      @himanshutripathi7441 2 года назад +6

      SSSSSS pls do it. Maybe a 9 minute video...... Go GO GO

  • @kurshadqaya1684
    @kurshadqaya1684 2 года назад +489

    The man who reads our mind.

    • @arvind6007
      @arvind6007 2 года назад +4

      Yeah😂

    • @lalitkumarsingh7225
      @lalitkumarsingh7225 2 года назад +3

      Like literally

    • @kigarde
      @kigarde 2 года назад +1

      😂True

    • @samman5980
      @samman5980 2 года назад +1

      I was literally searching his channel for this yesterday.

    • @vaisakhkm783
      @vaisakhkm783 2 года назад

      @@samman5980 i had searched this a long before, that dqy he put a video about module bundlers...

  • @saketaryan2227
    @saketaryan2227 2 года назад +174

    Evan you is really a gift to the javascript world . Full respect for this guy !

  • @mountainslopes
    @mountainslopes 2 года назад +468

    I love that Svelte Kit uses Vite under the hood. Makes for such a good developer experience

    • @michaelpumo83
      @michaelpumo83 2 года назад +188

      ...and Vite uses Rollup...created by Rich Harris who also created Svelte. Symbiotic or what.

    • @vikingthedude
      @vikingthedude 2 года назад +105

      Yeah it’s like a rich-evan-rich sandwich

    • @atljBoss
      @atljBoss 2 года назад +1

      whats the best way to init a svelte project with typescript

    • @abiodundacosta6250
      @abiodundacosta6250 2 года назад

      Love it 👌🏼

    • @HappyGick
      @HappyGick 2 года назад +1

      I thought Svelte Kit used Snowpack. I had read something like that on one of their blogs.

  • @nyashachiroro2531
    @nyashachiroro2531 2 года назад +277

    Now I use Vite for everything, even vanilla HTML, CSS and JS. Its amazing. Great video by the way.

    • @Technoph1le
      @Technoph1le Год назад +1

      You need to choose vanilla in options.

    • @akj3344
      @akj3344 Год назад +5

      What do you build with vanilla js though?

    • @coldestbeer
      @coldestbeer Год назад +11

      @@akj3344 to minimize the code

    • @coldestbeer
      @coldestbeer Год назад +1

      @Kirkstrider have you even used vite?

    • @manojramesh4598
      @manojramesh4598 Год назад +15

      ​@@coldestbeerdo you even know what is Vanilla JavaScript?

  • @noahg2
    @noahg2 2 года назад +109

    *It's called vite, not vite*

  • @KImtOs
    @KImtOs 2 года назад +104

    I HAVE BECOME ADDICTED TO YOUR 100 SECONDS VIDEOS, ALWAYS WAITING FOR THE NEXT

    • @watynecc3309
      @watynecc3309 2 года назад

      Go back to work baka

    • @KImtOs
      @KImtOs 2 года назад +1

      @@watynecc3309 **baka** part killed me xD

    • @watynecc3309
      @watynecc3309 2 года назад

      @@KImtOs *HIHIHA*

    • @emptychild2005
      @emptychild2005 2 года назад +1

      But there is already the NEXT video :)

    • @watynecc3309
      @watynecc3309 2 года назад

      @@emptychild2005 It was a good joke

  • @javiasilis
    @javiasilis 2 года назад +175

    I strongly recommend everyone to give Vite a shot. I migrated a relatively big appilcation (263 K lines of code) from Webpack to Vite as I was taking between 3 - 4 minutes to only START the dev server. After migrating to Vite, I slashed it to 5 seconds.
    Note: It didn't come without its issues, such as CommonJS support and refactoring of import and require statements. But it was worth it.

    • @avivshvitzky2459
      @avivshvitzky2459 2 года назад +2

      What it really gives beside fast server start?
      Alsk what about using libraries that have been built with webpack?

    • @Hasnain1F
      @Hasnain1F 2 года назад

      I tried Vite and I didn't like how it handled sourcemaps for JS and CSS. How is your experience with it so far?

    • @kirayamato6128
      @kirayamato6128 2 года назад +3

      Yup. Me also. Its a pain to debug the js. Also css sourcemap is broken right now. Thing i like vite is only the speed. Im using webapck mix and compilations are very slow. That's why i migrate to vite. Problem is only the sourcemaps

    • @LoryKa
      @LoryKa Год назад

      I will have to migrate an application as well. could you please give me tips on how to do this correctly and as flawless as possible?

  • @miguelus373
    @miguelus373 2 года назад +26

    It's impressive how 1 hour ago I read about Vite for the first time, and now this video pops up in my feed. I love this 100s videos

    • @jeremyccc
      @jeremyccc 2 года назад

      I think the big reason everyone is talking about Vite recently is because of how well it did in the state of JS survey

  • @thedrunknmunky6571
    @thedrunknmunky6571 2 года назад +233

    You made me switch to TypeScript and honestly, it was such a pain for the first 3-4 days. Now, just 7 days later, I don't think I can go back to vanilla JS. AND as TS is a bit slow on my PC, I'll be sure to check Vite out. I need that fast feedback loop.

    • @joseph0x45
      @joseph0x45 2 года назад +16

      I can feel that pain you're talking about 😢 I'm on day 2 of switching to TypeScript

    • @lukasbenediktson396
      @lukasbenediktson396 2 года назад +22

      A few months in and you will love yourself

    • @ysink
      @ysink 2 года назад +7

      > as ts is a bit slow in my pc
      Sadly TSC being slow is a fact of life and we cannot change it 😩 - esbuild it fast but no checking so we still need tsc in the end pain

    • @just-do-halee7375
      @just-do-halee7375 2 года назад

      Check SWC project

    • @habeeb196
      @habeeb196 2 года назад

      SWC also don't support typescript

  • @louisdu54
    @louisdu54 2 года назад +10

    THANK YOU ! My god Vite is amazing. I had a pretty big Laravel / Vue3 project that took 20 minutes to npm run hot (w/ sourcemaps) and about 10 seconds every hot reloads (on a 12 core server). Now it takes about 2 seconds to boot and half a second to update. It's incredible ! This + working on a remote machine means I can have my dev website on another PC and have it reflect the changes from my IDE in less than a second. incredible !

  • @shelomoh8741
    @shelomoh8741 2 года назад +8

    I don't know what I'll do without this channel, most of the time all I need a 100seconds clear explanation!! thanks

  • @reactwind
    @reactwind 2 года назад +18

    this is perfect timing, I was like dude why the 100 seconds of vite isnt a thing.
    FireShip: Post a video about it
    Me: lesssgo

  • @qonra
    @qonra 2 года назад +21

    I put together a rails+hotwire+vite+tailwind app recently and honestly this is the easiest web dev has been in years, I feel like we're finally getting away from the mess that web dev became half a decade ago. Everything seems to be consolidating and it's making the development experience a whole lot better.

  • @SirDamatoIII
    @SirDamatoIII 2 года назад +17

    Kicked out webpack last week. Vite is ridiculously awesome, especially with a VueJs project. Was a sinch!

  • @adamturaj9611
    @adamturaj9611 2 года назад +4

    New Fireship video! Love your content ❤️

  • @gustavo9758
    @gustavo9758 2 года назад +2

    My favorite part of the video is when Jeff starts talking, then when he continues talking and finally when he talks at the end.

  • @andrewpagan
    @andrewpagan 2 года назад +5

    My company just started using Vite, and it's fkn amazing. Not sure how I worked on the FE without it until now.

  • @thebigchainsaw1
    @thebigchainsaw1 2 года назад +2

    Talking about packages, the 'flash' really shows his off in your animation (0:56)

    • @sse87
      @sse87 2 года назад

      I was waiting for someone to comment on it! hahaha

  • @matsomo
    @matsomo 2 года назад +33

    I use Vite for everything and it still blows my mind every time how fast it is

    • @tobychidi
      @tobychidi 2 года назад

      Can it work with Next JS?

    • @alperaktas99
      @alperaktas99 2 года назад

      @@tobychidi
      at 1:15 he talks about a plugin that helps with server side rendering
      Edit: nvm i misunderstood the plugin part

    • @tobychidi
      @tobychidi 2 года назад +3

      @@alperaktas99 Yeah. But it's not Next JS though. That's Vite SSR

    • @alperaktas99
      @alperaktas99 2 года назад

      @@tobychidi ohhh my bad. I thought he meant that the plugin would extend Vite to work with nextjs had to rewatch it again

    • @adeyanjusegunsamuel2686
      @adeyanjusegunsamuel2686 Год назад

      The only the nextjs team can implement that. Take Nuxt3 does support vite even though it is kind of similar to Nextjs

  • @ikarusasas
    @ikarusasas 2 года назад +33

    My favorite part of Vite is that the dev command results in a bundle that is different from the build command. Love finding errors after building for production. Thank you JavaScript :)

    • @XTANCE
      @XTANCE 2 года назад +1

      Well after some time I started to simply ship dev version, and no fucks were given at all.

    • @JasonEfstathiou
      @JasonEfstathiou 2 года назад +2

      What..? Dev builds and production builds are wildly different in almost any language and toolchain. This is not specific to JavaScript and definitely not specific to Vite either.

    • @ikarusasas
      @ikarusasas 2 года назад +4

      @@JasonEfstathiou that shouldn't be the case, the code should be the same and run the same to avoid misleading bugs. It makes no sense to let the programmer think their stuff works at dev time just to throw them off at testing or production with a bug that doesn't occur in development environment

  • @EthanStandel
    @EthanStandel 2 года назад +1

    You hyped Vite like a week or two ago. I tried it and immediately fell in love. I've already converted the CRA/Craco app I was making

  • @alexawunor8853
    @alexawunor8853 2 года назад +1

    Arguably the greatest series on youtube.

  • @TomDoesTech
    @TomDoesTech 2 года назад +1

    So excited to create saome tutorials on Vite and Vitest

  • @sibyl4861
    @sibyl4861 2 года назад +1

    Evan You didn't disappoint with vue and now with vite. Both of these tools are awesome.

  • @DuongLe-em4dg
    @DuongLe-em4dg 2 года назад

    I just search for this video this morning on your channel and now you have uploaded it

  • @michaelpumo83
    @michaelpumo83 2 года назад

    Evan You is a darn genius. First Vue and now Vite. Talk about a resume!

  • @Unc3
    @Unc3 2 года назад +6

    the size of node_modules when generating a React project with Vite is also 3x lighter comapred to CRA (around 100mb vs 300mb) and the install/build times are just unbelievable

    • @riskiadhitama
      @riskiadhitama 6 месяцев назад

      #epic
      #ifinix
      #vaio
      #canon
      #nikon
      #sony
      #nokia
      #sumarecone
      #mercubuana
      #windows
      #samsung

  • @ngonimugumwa6374
    @ngonimugumwa6374 2 года назад +2

    Wow, definitely going to start using this over normal create-react-app

  • @thisissyedbasim
    @thisissyedbasim 2 года назад +2

    I really wanted this. Thank you so much fireship!
    you are my go to for learning new topics

  • @Yadin1234
    @Yadin1234 2 года назад +1

    Thanks for this video, it give me the confirmation I needed to start using vite in my projects

  • @CyberAnalyzer
    @CyberAnalyzer 2 года назад

    The harsh cut of the music at the end breaks my heart. Please add a fade out the next time. Awesome content! Ty!

  • @TCG-BOI
    @TCG-BOI 2 года назад +12

    I swear, your videos need to be used by universities and colleges to get better explanations on languages and technologies. Seriously, THE best content.

  • @imagineeelego
    @imagineeelego 2 года назад

    every time i learn something from scratch, he comes up with a video explaining it

  • @codewithchikondi
    @codewithchikondi 2 года назад

    At first, I went to their website and I didn't understand a thing. Thanks for the video, now I can install Vite confidently.

  • @clingyking2774
    @clingyking2774 2 года назад +1

    I'm still new to web dev but your content makes it very inspiring

  • @hadesthegod9181
    @hadesthegod9181 2 года назад +1

    I hope you’re making bank and I hope you’re happy because, to many of us, you’re a god. Cheers and thanks for helping me get my programming skillset together!

  • @codethinh7319
    @codethinh7319 2 года назад

    Your timing is impeccable! I was just looking into this.

  • @nztchris313
    @nztchris313 3 месяца назад

    I love you channel , you don t know what certain stack does ? boom Vite in 100 secs

  • @vikumwijekoon3166
    @vikumwijekoon3166 2 года назад +2

    Vite is a fucking rocket. Holy shit man it starts a react dev server in like 2 seconds. They should have named it yeet

  • @andorkh
    @andorkh 2 года назад +3

    I'd love to see a more indepth video of how to setup and use Vite! Looks really interesting, and much less suffering to setup then webpack

  • @JoshBromberg
    @JoshBromberg 2 года назад +1

    Been using Vite on my current project, it’s awesome

  • @manofacertainrage856
    @manofacertainrage856 7 месяцев назад

    I was doing WebGL2 examples with Live Server on VSCode and started running into errors importing a module, so I remembered this video and only needed the first 80 seconds to get up and running. Nice!

  • @PwrSrg
    @PwrSrg 2 года назад +1

    Can you please do Solid.js in 100 seconds?!? You always talk about how fast and awesome it is in other videos, but have barely ANY dedicated content on it. 😟
    Thanks for everything else! You ROCK! 🚀

  • @josephmuola2609
    @josephmuola2609 2 года назад

    Man those intros definitely make my day

  • @dmitrypatriarkh9757
    @dmitrypatriarkh9757 2 года назад

    I'm excited that someone can create useful tool in 2022 when we have literally everything for anything

  • @RicardoValero95
    @RicardoValero95 2 года назад

    These are the videos I need for my work colleagues to completely approve my decisions, been waiting for this one

  • @StellarWeb008
    @StellarWeb008 2 года назад

    Before I used to give zero respect to Vite but now I know Evan You is really a genius.

  • @ameerabdallah5429
    @ameerabdallah5429 2 года назад +1

    Me: "Oh what is Vite" *click video*
    Fireship: "Veet"

  • @darkside3ng
    @darkside3ng Год назад

    your videos are always astonishing and mesmerizing.

  • @SkyyySi
    @SkyyySi 2 года назад +5

    I recently tried getting into web dev with react - and immediately stopped, because I had to wait longer for compiling and bundling than with C#. Thanks for letting me know about Vite.

    • @petargolubovic5300
      @petargolubovic5300 9 месяцев назад

      Yeah, me too. I tried create-react-app and it was so slow I thought the shell froze every time. Vite is a lifesaver.

  • @DrJimmyBob
    @DrJimmyBob 2 года назад

    That intro was incredible. I didn't make it 3 seconds before I hit the comments

  • @muhammed.a.k
    @muhammed.a.k 2 года назад

    Never knew about it, fireship is the best. Thanks for keep updating and the way you edit your videos are super duper. Much love from India

  • @cindrmon
    @cindrmon 2 года назад

    thank god for vite! i love this so much! thanks for covering it!

  • @dbroche
    @dbroche 2 года назад

    Effing love Vite! Looking forward to a full 1.0 release of VitePress

  • @_glyme_
    @_glyme_ 2 года назад +13

    With this channel, we learn "vite" (fast in french)
    Sorry I had to make the joke

  • @MaxDjTutorials
    @MaxDjTutorials 2 года назад +1

    Cool! Thanks for sharing this.

  • @ZuriPOL
    @ZuriPOL 2 года назад

    I am addicted to fireship videos

  • @nerosonic
    @nerosonic Год назад

    I honestly think Evan You is the modern day Einstein. This guy is a freakin genius.

  • @exortions3079
    @exortions3079 2 года назад

    Wow, another fireship upload!
    Jesus, you're uploading like crazy lately :-)

  • @hardikmirg6279
    @hardikmirg6279 2 года назад +2

    My laptop was too slow to use create react app, i started using vite some months ago- JUST LOVING IT!
    I'd be nice if you could make some tutorial with PWA and service worker with Vite :P

  • @maximiliangewers8513
    @maximiliangewers8513 2 года назад +1

    That "flash" gif has something going on, if you look close enough. 0:54

  • @kodee2
    @kodee2 2 года назад +1

    When you should that it loaded the actual source code in browser, vite blew my mind. Definitely trying vite out next chance I get for a side project

  • @nate32396
    @nate32396 Год назад

    I recently moved my react app from CRA to Vite, it was a pain to do, but I’m so glad I did it.

  • @LynXify
    @LynXify 7 месяцев назад

    Vite has made Vue dev so much better Vue CLI was struggling in the smallest of the projects

  • @pacifi5t
    @pacifi5t 2 года назад

    Finally my favorite JavaScript tool. Vite saved me from a lot of headache & lost time, so I recomend you switch to it.

  • @gregor3148
    @gregor3148 2 года назад

    Used this for my Sveltekit app, works very amazingly. Super fast and super slick

  • @raz0229
    @raz0229 2 года назад

    I knew this was coming. Jeff has mentioned it several times in his videos that Vite is awesome

  • @dot4636
    @dot4636 2 года назад +1

    These videos are always right on time with when i want to learn a new technology. Can you make one about the webserver Caddy?

  • @fajarsetiawansiagian
    @fajarsetiawansiagian 2 года назад

    thanks for the intro. look like to try move from webpack to vite

  • @Daaboo
    @Daaboo Год назад

    I hated react before because it was a messy install and so bloted with junk folded etc. With vite you get a clean setup that's much easier to navigate! We need more stuff like this to speed up coding

  • @mrreese2342
    @mrreese2342 Год назад +1

    Vite is one of those tools where you're all stressed and worried about build problems and then it just comes and fixes everything

  • @avithedev
    @avithedev 2 года назад

    This guy made me love javascript

  • @soviut303
    @soviut303 2 года назад +1

    A follow up with Vitest would be great.

  • @modolief
    @modolief 2 года назад +6

    Request: Could you do _The Bridge Pattern_ in 100 seconds? I started watching some 15 minute video on this the other day and nearly fell asleep. It seems like the central concept could easily be explained in 100 seconds.
    I guess the other design patterns could also be done in 100 seconds. Though what is there to say about _Iterator_ that needs that much time, I'm not sure.

    • @mrbaeman39lolman60
      @mrbaeman39lolman60 2 года назад

      Aren't there books for design patterns?

    • @modolief
      @modolief 2 года назад

      @@mrbaeman39lolman60 I know, right? Seems like too much. But, as we now see, Fireship has us covered with his most recent video "10 Design Patterns Explained in 10 Minutes" -- ruclips.net/channel/UCsBjURrPoezykLs9EqgamOA

  • @frenzyvanrafi
    @frenzyvanrafi 2 года назад

    I recently using Vite for my Vue 3 front-end development and I love it!

  • @jimbo-dev
    @jimbo-dev 2 года назад

    Evan You is true web developer madlad

  • @MercyFromOverwatch2
    @MercyFromOverwatch2 2 года назад

    Jeff is still my favourite tech youtuber

  • @Mauro0
    @Mauro0 2 года назад

    I have been using vite for 6 months and I love it. It's sooooo fats

  • @christophkrass6929
    @christophkrass6929 2 года назад

    that's funny... I've started my first project with vite yesterday :D
    Thank you Mr. Fireship

  • @alejandroangongandara678
    @alejandroangongandara678 Год назад

    Best 100sec spent lately

  • @amansetia8655
    @amansetia8655 2 года назад +1

    vite is amazing, when i was trying svelte i got more roll up errors than js ones, i had given up svelte once due to roll up and was about to do again but then i found vite, loving svelte and vite since

  • @user-kf7my6tg7i
    @user-kf7my6tg7i 2 года назад

    Beautiful straight to the point explanation! Thanks for the video

  • @jacquesduplessis6175
    @jacquesduplessis6175 2 года назад

    Love vite, I use it fore everything front-end outside of work👍🏻

  • @renereiterer6058
    @renereiterer6058 2 года назад

    Never heard of it but it sounds really awesome,
    have to check it out for my next project

  • @itRemindsMeThatItNotSoBad
    @itRemindsMeThatItNotSoBad 2 года назад

    I fricking love this guy

  • @btarg1
    @btarg1 2 года назад +1

    This makes me want to try learning JS, it looks way easier than anything else!

  • @adisonmasih
    @adisonmasih 2 года назад

    if EVAN Can do it, Even You Can Do It! let's GOOOO !!!!

  • @amirani836
    @amirani836 2 года назад

    Yea Vite is amazing, I was working on vue store front and it is fuuucking slowly but with Vite it will be fine. evan you is amazing person.

  • @Warface
    @Warface 2 года назад +1

    Now if Vite could support Next.js this will be dope AF

  • @nathansavage8692
    @nathansavage8692 2 года назад

    2:02 Just... The... Wot? That is so fucking cool! No reload or anything!

  • @h.nazmulhassanrakib5058
    @h.nazmulhassanrakib5058 2 года назад +2

    🤣🤣🤣 npm run subscribe...
    .. I am using Vite for the last 6 months.. really a very good bundler.

  • @LofiWurld
    @LofiWurld 2 года назад

    the avatar of web dev, bending the four elements of html, css, javascript, server stuff

  • @bakhtiyor_sulaymonov
    @bakhtiyor_sulaymonov 2 года назад

    Wow very efficient 100 seconds

  • @TheBicPen
    @TheBicPen 2 года назад +3

    "Makes TypeScript 20x faster by skipping type checking".. Isn't the whole point of TypeScript its ability to check type usage at compile time? Why not just use plain JS at that point?

    • @luizAugustoll
      @luizAugustoll 2 года назад

      No, the point it's avoid jsdocs and have a good lint support

  • @WrittenInFilm
    @WrittenInFilm 2 года назад +6

    Another day, another non native bundle that will make your entire project dependent on the developers keeping the project updated, all to be replaced in 3-5 months with something thats better.

    • @bossgd100
      @bossgd100 2 года назад +4

      Js hell , a revolutionary tool that will need a complementary tool and that tool will need another tool again....

  • @vladislavkaras491
    @vladislavkaras491 2 месяца назад

    Thanks for the video!

  • @ondrejhana3740
    @ondrejhana3740 2 года назад

    Great video, also looking forward to Tauri in 100 sec

  • @Yaxqb
    @Yaxqb 2 года назад

    Webpack was the pioneer, Vite is the mastercraft

  • @RobertWildling
    @RobertWildling 2 года назад

    How about a video about creating those logos? really beautiful work! I have a feeling you are re-defining logo aesthetics!