Visual Guide to the Modern Frontend Toolchain (Vite)

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024

ความคิดเห็น • 156

  • @LachlanMiller
    @LachlanMiller  6 หลายเดือนก่อน +52

    Sorry for the quality folks, I'll figure out what went wrong and be in 1080p moving forward!

    • @recursion.
      @recursion. 6 หลายเดือนก่อน +2

      2k/4k screen-record with side by side windows via loom works the best.

    • @shakiltech1
      @shakiltech1 6 หลายเดือนก่อน

      Can you please share your vscode theme and setting

    • @tantalus_complex
      @tantalus_complex 6 หลายเดือนก่อน +7

      Great walkthrough of the concepts!
      As a trainer of instructors, I'd like to recommend that you _progressively_ reveal your complex diagrams in your videos, for the same reasons that we avoid throwing all our bullet points on a single slide in slideshow presentations.
      You will intimidate fewer learners initially and you will _shepherd their attention_ where it needs to be, as it needs to shift. Less visual complexity, fewer distractions, lower emotional and cognitive resistance.

    • @aryan.prince
      @aryan.prince 6 หลายเดือนก่อน +1

      @@tantalus_complex Adding to this, I would like if there was a blend of both actually. I liked how he showed the entire diagram just so I have a mental map of how much more stuff he'd be covering. If I never saw the entire diagram, I'd have this internal 'uncertainty' on how much more stuff he'd be talking about.
      I think best solution would be to briefly showcase the whole diagram or so to let everyone know what all we'll be covering, and then you can zoom in to progressively reveal stuff like person above mentions.

    • @tantalus_complex
      @tantalus_complex 6 หลายเดือนก่อน +2

      @@aryan.prince I didn't want to go into depth about strategies here, but yes, you want to give _some_ kind of preview to "where we're going."
      I recommend digesting it down to a few on-screen bullets or steps or highlighted junctions of diagram. Save the complexity for the main content but do provide an overview in some form.

  • @samfelton5009
    @samfelton5009 6 หลายเดือนก่อน +26

    What an amazing explanation! I’ve never heard someone explain how js compilation works in such a clear way. Thank you!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Glad it was helpful!

  • @dimis7096
    @dimis7096 หลายเดือนก่อน +2

    oh my god friend you will never believe how useful this video was for me and how many concepts you helped me to grasp ! Thank you very much , i love you i wish you the best

  • @FeelingLike
    @FeelingLike 6 หลายเดือนก่อน +9

    This is soooooo helpful for people like me that love to know what is happening under the hood of these applications. Really appreciate the work done!

  • @joshua.hintze
    @joshua.hintze 6 หลายเดือนก่อน +12

    Nicely done. At first I was skeptical about how deep you would go, but I think this is a great start. I would love to learn more deep into it as well. Thanks

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +5

      I would love to go deeper and will do so, packing all this into a single video is impractical - better to focus on one part at at time. What part do you want to see next? I will probably do HMR, it's the most fun part, what about you?

  • @mujibulhaquetanim
    @mujibulhaquetanim 6 หลายเดือนก่อน +4

    I would love to see more videos from you on all the topics you covered in this one. It would be awesome if you could make a series out of it. Thank you for your amazing work!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      More coming! Thanks for the kind words!

  • @coffeemakir1977
    @coffeemakir1977 5 หลายเดือนก่อน +1

    Bro!!! This answered so many questions/problems nobody talks about since I looked at react years ago and now I have more questions 😭

  • @Kevin-xo5ul
    @Kevin-xo5ul 6 หลายเดือนก่อน +1

    I finally found some good frontend content I like. I'll wait for your book.
    I'm a frontend developer but also have a lot of love for compilers. One thing that annoys me a lot is (frontend) developers not understanding the tools they work with.
    Knowing a little bit about what problem a tool solves and how, will translate into being more productive in the long term. It will also give you independence as you don't need others to help you with a tooling problem. Need your build tool to do something but can't find a plugin that already does that? No problem, just write it yourself!
    Also developer UX is a big thing for me. I feel like I can do so much more in less time, just because I know which tools to use and when.
    Keep making these videos, I'll keep watching!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thanks Kevin! I am in the same boat as you, I did a lot of frontend development but am much more interested in tooling (front, back, whatever) - it's all the same concepts, really!

  • @Asvarox
    @Asvarox 4 หลายเดือนก่อน +1

    I think there are couple of inaccuracies though as per Vite docs
    1. when you run vite build it doesn't do typechecking and doesn't use tsc - it uses esbuild to get rid of types. You need to do the typechecking yourself or add a plugin
    2. when building, by default esbuild is used to minify JS

    • @LachlanMiller
      @LachlanMiller  4 หลายเดือนก่อน

      Definitely possible I made mistakes. I looked into your two points:
      1. For type checking, I made a new react TS project. `npm run build` does this:
      > react-ts-vite@0.0.0 build
      > tsc && vite build
      So you are right, vite build does not do type checking. But many Vite templates will run tsc when you run a build step. Good point, thank you for pointing this out.
      2. Did not check this in depth but I suspect you are correct.
      Wasn't expecting this vid to blow up so much, will definitely be more thorough in future! I think this still gives a good overview of the general tools but there is a lot more going under the hood.

  • @aerostorm_
    @aerostorm_ 5 หลายเดือนก่อน

    Amazing video. It took me transitioning a CRA project to Vite while modernizing some of my build processes to even understand half of what goes on when building a React app. I wish I had this video then.

  • @aissa.bouguern
    @aissa.bouguern 6 หลายเดือนก่อน +10

    This was super informative!
    Keep up doing good stuff.

  • @patricknelson
    @patricknelson 6 หลายเดือนก่อน +1

    Very good! Not sure if visible in this chart, but one really interesting architectural feature of Vite to me was that during “dev”, this transpilation is being performed live on request (asynchronously) whereas the production build phase will pre-build/transform the code and save it to plain .js files. That’s partly why it’s so fast but also might explain some differences between how the dev generated references look (e.g. file paths) when compared to the bundled versions.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      This is something I have always found a bit strange, too. Despite this, it generally works pretty well (amazingly) but I do hope that eventually dev/prod mode can use a single tool (maybe esbuild?)
      I will do more research and try to talk about this in the future entry in this series. Thank you for the comment and food for thought!

  • @MrBumbo90
    @MrBumbo90 6 หลายเดือนก่อน +2

    Hey man, I really appreciate this videos. I just discovered your channel and I think I'll be going on a binge. The vue vs react video was also great.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      thanks for the kind words!

  • @rredington305
    @rredington305 5 หลายเดือนก่อน

    Godspeed CRA, my loyal old friend. I'm hooked on Vite for months now.

  • @joaopslins
    @joaopslins 6 หลายเดือนก่อน

    I've seen you before in some Vue related repos in Github, just wanted to say thank you for your OSS contributions! 🙏
    This is a very insightful video. Sometimes I'd like to know more about Vue ecosystem packages' inner workings, and there's not much material around for easy consumption so the more we have, the better.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Thanks! I want to try and make more content around the more advanced/interesting stuff

    • @joaopslins
      @joaopslins 5 หลายเดือนก่อน +1

      @@LachlanMiller If I may give a suggestion, one thing that always gets me is how the change detection / rerendering works in Vue. Coming from a React background, I had a lot of trouble until I understood more about it.
      But even after a long time with Vue, things like a computed returning the same value still rerendered the component was very surprising to me. It was finally "fixed" in 3.4, but that just shows how much I don't know about the subject 😂
      There is a section in Vue docs about reactivity and rerendering but I feel like it does not go too deep into it, so more material about that would be great.
      Hope this comment is useful 🙇

  • @winterqq1270
    @winterqq1270 6 หลายเดือนก่อน +3

    very helpful, understanding how these stuff works, really helps me with imposter syndrome

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Yeah me too, I have no idea what I'm doing, just figuring it out as I go 🤷‍♂

  • @thefreemarketdev
    @thefreemarketdev 5 หลายเดือนก่อน

    Thanks for the breakdown. Always good to know what features exist under the hood of frontend toolkits.

  • @marekkamyk5518
    @marekkamyk5518 6 หลายเดือนก่อน +1

    Increadible content, looking forward to hear more from you. I will watch more of your videos and follow you. Good luck and thanks for awesome learning possibilities

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Working on next video in this series already, thanks for the feedback!

  • @approxahmed
    @approxahmed 6 หลายเดือนก่อน +1

    Very clear and straight to the point, thanks for the explanation!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      No problem, I am not one to waste your time, just prefer to straight to the point

  • @saeedjalali7339
    @saeedjalali7339 6 หลายเดือนก่อน +2

    The visual explanation is dope but I felt lack of something at the end like It was all theory-based. although it gave me some clarification about internals, showing some code can be useful too. great and unique content btw keep it up.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      I will go more deep into code next one! Thanks for the kind words!

  • @hut_fire1490
    @hut_fire1490 5 หลายเดือนก่อน

    Oh man, gold stuff sir ! I wish you can go deeper, but this stuff is a very great introduction already

  • @sangilyun234
    @sangilyun234 6 หลายเดือนก่อน +1

    thank you for the awesome video. can't wait for the book to come out!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      me too!!! lots of work to do, I want to build a react like framework to go with it!

  • @DoNotMerge
    @DoNotMerge 6 หลายเดือนก่อน

    Great content, Lachlan! Love the explanation. I have issues with making dynamic imports work for me in Vite and your overview helped me to understand where I should investigate

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Glad to hear I helped!

  • @robolist2277
    @robolist2277 6 หลายเดือนก่อน +1

    Awesome video would love to see more similar explanations for other tools!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      More to come! ⚡️

  • @JaLikon65
    @JaLikon65 6 หลายเดือนก่อน +1

    This was SUPER informative! Thank you for dong this, I learned a lot and you're a great explainer :)

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thanks! More deep dive content soon!

  • @aaravsibbal8568
    @aaravsibbal8568 6 หลายเดือนก่อน +1

    Great video! Before this I just didn't know about vite but now I'd be more comfortable using it, especially the part about imports because that was some of the main issues that I had with js lol

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      The js module system is a complete clusterfuck, I made a video about it a week or two ago, if you have any specific content ideas around modules lmk - I know basically everything about the module system now from years of pain

  • @lukefiji
    @lukefiji 6 หลายเดือนก่อน

    Amazing! As an improvement I would like to suggest adding annotations to your diagram, e.g. jsx compilation arrow pointing to esbuild is labeled "dev", while the arrow pointing to tsc is labeled "prod"

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Good idea! honestly I threw this together in about 10m - did not expect this many views!

  • @johnm8358
    @johnm8358 6 หลายเดือนก่อน +2

    More vite videos please 😊.. beyond the basic config it gets tricky

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Sure thing, do you like the visual style or do you want to see more of the actual code base? Vite is ⚡

    • @johnm8358
      @johnm8358 6 หลายเดือนก่อน

      @@LachlanMiller bit of both would be 👍, I do like vite but say I want to custom configure roll up options.. it can get a little tricky.. although I haven't spent a huge amount of time on it

  • @6peekaboo9
    @6peekaboo9 6 หลายเดือนก่อน +1

    amazing video, never knew vite is doing so much work for us. great content, Keep it up!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thank you! Vite is the best, it's fast ⚡

  • @eihab
    @eihab 6 หลายเดือนก่อน

    Great video! Glad I came across your content, looking forward to the release of your tooling book ✌

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Thanks! I think it'll take the best part of the year to write.

  • @kevinisaac4958
    @kevinisaac4958 3 หลายเดือนก่อน +1

    You've got my subscribe. More videos like this please!

  • @boubaker86
    @boubaker86 5 หลายเดือนก่อน

    Very informative video
    PS: I like your keyboard layouts

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      hi! what do you mean keyboard layouts?

  • @alexanderzin
    @alexanderzin 2 หลายเดือนก่อน +1

    This is gold

  • @dimitriborgers9800
    @dimitriborgers9800 23 วันที่ผ่านมา

    Super helpful, thank you!

  • @recursion.
    @recursion. 6 หลายเดือนก่อน +1

    Hey Lachlan great video. Would love the series of you deep diving on technology like rust, wasm and webgl.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Thanks for the comment! WebGL - yes, done a bit, love it. Wasm - did a bit, haven't got any use case but learned a ton, Rust - tried advent of code last year with Rust, this language is really hard 🤯

    • @recursion.
      @recursion. 6 หลายเดือนก่อน

      and also would love videos on JS testing frameworks too.

  • @hideinbush0
    @hideinbush0 6 หลายเดือนก่อน

    Very easy to understand and thorough, subscribed!

  • @rajmajumdar5253
    @rajmajumdar5253 6 หลายเดือนก่อน +1

    Great thsi what we need rolight now, understanding how tools works is really important.
    Would also love of you show how frameworks like vue, svelte, astro etc works behind the hood albeit with some code. Keep it up bro 👍👍👍👍 you earned a sub.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Lots more "under the hood" on the way, especially for Vue/React which I know best. Svelte seems neat too, haven't tried Astro yet - should I??

    • @rajmajumdar5253
      @rajmajumdar5253 6 หลายเดือนก่อน +1

      @@LachlanMiller you should, it could be even more amazing, cause you can use almost all type of frameworks with astro like use using react and qwick together in astro.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      @@rajmajumdar5253 Oh neat, I didn't know I could integrate Astro with my other stuff. I will check this out!
      Qwik seems kind of weird, I don't see that much value in the reusability paradigm

  • @nader2560
    @nader2560 6 หลายเดือนก่อน +1

    Nice work bro! Awesome format and very rich content! There's some flickering in your background tho, idk if it's a fan turning above your head or it's the light source but it hurts the eyes 😅

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      I think it's the fan, I will turn it off next time 😎 thanks for the tip!

  • @cariyaputta
    @cariyaputta หลายเดือนก่อน

    Thanks. Quality explanation.

  • @angjonsehrik7561
    @angjonsehrik7561 6 หลายเดือนก่อน +1

    Would love to see video about vitest

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Me too, I don't know how it works really, but I will find out and make a vide about it

  • @whatplan4335
    @whatplan4335 6 หลายเดือนก่อน +6

    great content
    1080p please

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +2

      I thought OBS defaulted to 1080p, I must be doing something incorrectly. I will find out and fix it!

    • @MrNedinator
      @MrNedinator 6 หลายเดือนก่อน

      @@LachlanMiller if you're not streaming, be sure to crank up the video bitrate a bit too. theres a lot of in depth OBS setup guides out there that'll help with your quality :)

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      @@MrNedinator Yep this was my mistake, I used to just do quicklime which defaults to 1080, apparently OBS does not do that. TY for the tip!
      No streaming for me, don't really see the value, I see more value in spending time to create a high quality, concise video 🚀

  • @adehenry9591
    @adehenry9591 6 หลายเดือนก่อน

    It was well explained and helpful

  • @anuragpramanik6095
    @anuragpramanik6095 6 หลายเดือนก่อน

    Thanks for this informative video.

  • @harikotha7
    @harikotha7 5 หลายเดือนก่อน

    Awesome!! Nice explanation.
    Keep making such explainer videos ❤

  • @dontry1812
    @dontry1812 3 หลายเดือนก่อน +1

    Great stuff. I am starting to hook on Vite. One important thing I hope Vite had out of box is Module Federation, which is quite essential to build micro-frontend. Do you have any idea how to build micro-frontend with Vite?

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน

      Not sure about micro frontends! I have not worked with those before. Let me know iff you find out!

  • @andrednb1
    @andrednb1 6 หลายเดือนก่อน

    if you want, you can resample and upscale for 1080p, but its ok like it is rn ! top content :D

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      I had no idea that was even possible
      I still have the raw recording, but I don't think it is possible to replace an existing YT video :( Probably just going to live with it for now and be more careful moving forward!

    • @andrednb1
      @andrednb1 6 หลายเดือนก่อน

      dont mind over this @@LachlanMiller
      just keep producing more content like this :D

  • @vitaliiruzhentsov9220
    @vitaliiruzhentsov9220 6 หลายเดือนก่อน +1

    Nice explanation, but...
    I expected from the preview "How Vite really works?" - this tool architecture breakdown, and why is it faster then webpack and what is the difference between architecture of esbuild.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Too much to pack in one video
      I will make more in depth on each of the parts soon. Even just learning one of the tools is a huge topic!
      Thanks for the encouragement, stay tuned for more ⚡️

  • @NdagiStanley
    @NdagiStanley 6 หลายเดือนก่อน

    You earned a sub. Great explainer

  • @fredbcruz
    @fredbcruz 6 หลายเดือนก่อน

    Amazing explanation!
    I'm interested in understanding better how plugins integrate with vite

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Good idea for more content - the plugin architecture is pretty neat actually, hopefully I can talk about it soon!

  • @MuhammadIbrahim-x3h
    @MuhammadIbrahim-x3h 26 วันที่ผ่านมา

    You have awesome content.I am stuck on a problem plz guide me on
    I am implementing server-side rendering for a datatable (e.g., blog listing) in my Laravel project. I need to create a JavaScript file for this purpose. Should I place this datatable JS file in the public directory? If so, how do I compile the JS file from the resources directory to the public directory using Laravel Vite?Where should be the file placement in the folder structure.
    project-root/
    ├── resources/
    │ ├── js/
    │ │ ├── app.js
    │ │ └── datatable/
    │ │ └── blogListing.js
    ├── public/
    │ └── build/
    ├── vite.config.js
    ├── package.json
    └── ...

  • @Mr.x.187
    @Mr.x.187 6 หลายเดือนก่อน +1

    Thanks for this video!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thanks for the encouragement I appreciate it!!

  • @mrwick2op
    @mrwick2op 6 หลายเดือนก่อน +1

    Quality content. You gained a subscriber

  • @anavgengineer
    @anavgengineer 5 หลายเดือนก่อน

    Good one and to the point❤

  • @marknielsen4494
    @marknielsen4494 หลายเดือนก่อน

    Excellent

  • @codingprograms2078
    @codingprograms2078 6 หลายเดือนก่อน +1

    Tough af 💪 ❤

  • @panchcw
    @panchcw 6 หลายเดือนก่อน

    very usefull stuff. please make some deep concepts behind this

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      yes sir, coming soon. This stuff takes a while to make!

  • @eleah2665
    @eleah2665 5 หลายเดือนก่อน

    Great. Thanks.

  • @armynyus9123
    @armynyus9123 5 หลายเดือนก่อน

    damn I would so much love to see this but I only have time after work hours and then I really physically can't look into bright white screens anymore. YT vids are where darkmode just fails.... uff had to scroll up even writing this.
    Maybe worth a consideration...

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      Sorry about that 🙁

  • @Thelukkest
    @Thelukkest 6 หลายเดือนก่อน

    Thanks

  • @threolin
    @threolin 5 หลายเดือนก่อน

    Thanks! Quite informative!

  • @sazk4000
    @sazk4000 6 หลายเดือนก่อน +1

    this video is very good. thank you for making this. can you please use a darker theme? It is hurting my eyes (I have sensitive eyesight issue)

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Do you mean for the diagram or vscode?
      Sorry to hear that, maybe Eraser has a dark mode...

  • @al1gned
    @al1gned 6 หลายเดือนก่อน +1

    Subbed, keep the content coming!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Working on more, this kind of content takes a bit more time than usual!

    • @al1gned
      @al1gned 6 หลายเดือนก่อน

      @@LachlanMiller quality over quantity, any day :)

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      YES!!@@al1gned

  • @joaooliveirarocha
    @joaooliveirarocha 6 หลายเดือนก่อน

    I work as frontend. I do work on projects that have similar or more complex tooling. I even had to implement some part of that on a internal tool. Where did we screw up? Why do we need so much of this just to write JS?

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      The main reason is, JavaScript was not designed to build these large complex applications! But it's the only language we've got the browser so we have to make do.
      All other languages and ecosystems have the complex tooling too - compilers, linkers, etc... it's just more mature and will add distracted, so you don't know about it 😅

  • @MouseCodes
    @MouseCodes 6 หลายเดือนก่อน +1

    Great content🎉

  • @anasouardini
    @anasouardini 6 หลายเดือนก่อน +1

    "we strip type checking because it slows you down", like you could do it anyways, it's only static and not even JavaScript. TypeScript is just a linter

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      I think TS is a bit more than just a linter, though - it does do some transforms, like JSX, changing some syntax (like import -> require for cjs) but my understanding is the main bottleneck is the type checks.

    • @Kevin-xo5ul
      @Kevin-xo5ul 6 หลายเดือนก่อน

      TypeScript used to be more of a multi-purpose tool, like Lachlan mentions. These days its all about its type system and it lets other (better) faster tools solve the other problems. You still the want actual type checking process to run before you deploy to production, usually on a build pipeline where the build fails if type checking fails. Just as you probably want your linter to actually run on your pipeline, instead of just giving hints in your editor.

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      @@Kevin-xo5ul My one wish for TS would be a proper spec so all the other (faster) implementations could align more easily. Right now the "spec" is just looking at what the reference implementation does.

  • @Yogesh-kr7bo
    @Yogesh-kr7bo 6 หลายเดือนก่อน +1

    what theme is that in vscode btw nice video

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thanks, it is Egoist One

  • @adnandev_
    @adnandev_ 6 หลายเดือนก่อน +1

    Incredible content keep it up please

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Thank you for the kind words!

  • @wobsoriano
    @wobsoriano 6 หลายเดือนก่อน +1

    Youre a legend

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      I've seen a bunch of your OSS work on your GH you are the real legend

  • @deepfuchsia7204
    @deepfuchsia7204 5 หลายเดือนก่อน

    Do you believe we need this level of complexity on the front-end side?

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน +1

      yes, doing frontend back in the day with no babel, no bundle, no types etc was a nightmare
      backend has this level of complexity too, it is just so well abstracted you don't get exposed to it

  • @MeerUzairWasHere
    @MeerUzairWasHere 6 หลายเดือนก่อน +1

    Great!

  • @samuelgoncalves5616
    @samuelgoncalves5616 6 หลายเดือนก่อน

    Hey, thanks for the video! Amazing content. One thing tho was not very clear to me: what do you mean by "in dev we do not care about type-check but in prod we do"? Thanks!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      Hi! What I mean is when you are doing your general frontend development workflow in Vite (eg making components, layouts, styles) you want HMR as fast as possible. For this reason esbuild simply ignores or "strips out" the type definitions from your typescript - a type error will NOT prevent HMR from running.
      Vite calls this "transpile only". Read this point in the docs: vitejs.dev/guide/features.html#transpile-only
      You need to rely on your editor to show you type errors during development.
      When you deploy to production, we DO want as much type safety as possible, so the build will fail if there are issues.

    • @Kevin-xo5ul
      @Kevin-xo5ul 6 หลายเดือนก่อน

      @@LachlanMiller Good explanation, there are options like running the type checker in a separate terminal or as a child process, that way HMR is still blazing fast and you still get proper compilation errors in case your editor and extensions miss something. Usually not needed, but if you really want it there are options without slowing down your dev UX.

    • @samuelgoncalves5616
      @samuelgoncalves5616 6 หลายเดือนก่อน

      @@LachlanMillerI understand now, thank you very much!!!

  • @assertnotnull
    @assertnotnull 6 หลายเดือนก่อน

    This video is one of the reasons I hate Javascript. It's so complicated. Add NX on top of this.
    I am facing a memory issue with tsc because of too complex types from Graphql objects. Hopefully webpack still compiles the code but then I have to figure out how to fix tsc part. 🤪🔫

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Nx is way too complex for most projects
      Graphql is a whole other bag of worms - this isn't really JS specific though, is it?
      but yes, ecosystem is complex!

    • @assertnotnull
      @assertnotnull 5 หลายเดือนก่อน

      @@LachlanMiller all but one graphql library in Typscript are built that when you request properties of any object in a query, all the values can be null and undefined. It gets heavy quick.

  • @luffythestrchykid
    @luffythestrchykid 6 หลายเดือนก่อน

    Vitest is a nightmare

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      What issues are you having?
      I found it a bit buggy but it is nice and quick, and particular problems you've had?

    • @luffythestrchykid
      @luffythestrchykid 6 หลายเดือนก่อน

      @@LachlanMiller frequent running out of memory, debugging is pain in the ... Many are facing the same problems