Visual Guide to the Modern Frontend Toolchain (Vite)

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

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

  • @LachlanMiller
    @LachlanMiller  9 месяцев назад +55

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

    • @recursion.
      @recursion. 9 месяцев назад +2

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

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

      Can you please share your vscode theme and setting

    • @tantalus_complex
      @tantalus_complex 9 месяцев назад +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 9 месяцев назад +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 9 месяцев назад +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 9 месяцев назад +27

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

  • @FeelingLike
    @FeelingLike 8 месяцев назад +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!

  • @dimis7096
    @dimis7096 3 месяца назад +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

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

    I always love to know what is happening under the hood in the tools and frameworks I use otherwise I feel uncomfortable while using them and this explanation helped me to scratch the surface and figure out what is going on and what are these tools is all about, thank you a lot.

  • @joshua.hintze
    @joshua.hintze 9 месяцев назад +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  9 месяцев назад +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?

  • @coffeemakir1977
    @coffeemakir1977 7 месяцев назад +1

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

  • @mujibulhaquetanim
    @mujibulhaquetanim 9 месяцев назад +5

    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  9 месяцев назад

      More coming! Thanks for the kind words!

  • @aerostorm_
    @aerostorm_ 8 месяцев назад

    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.

  • @Kevin-xo5ul
    @Kevin-xo5ul 9 месяцев назад +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  9 месяцев назад

      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!

  • @rredington305
    @rredington305 8 месяцев назад

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

  • @Asvarox
    @Asvarox 7 месяцев назад +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  7 месяцев назад +1

      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.

  • @patricknelson
    @patricknelson 9 месяцев назад +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  9 месяцев назад +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!

  • @RaviGILL-s1f
    @RaviGILL-s1f 26 дней назад

    I just forced myself to watch whole video, and it was good

  • @albertkim1809
    @albertkim1809 Месяц назад +1

    Amazing in-depth look at the build system, thank you

  • @thefreemarketdev
    @thefreemarketdev 8 месяцев назад

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

  • @dontry1812
    @dontry1812 6 месяцев назад +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  6 месяцев назад

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

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

    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  9 месяцев назад

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

  • @marekkamyk5518
    @marekkamyk5518 9 месяцев назад +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  9 месяцев назад

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

  • @aissa.bouguern
    @aissa.bouguern 9 месяцев назад +10

    This was super informative!
    Keep up doing good stuff.

  • @MrBumbo90
    @MrBumbo90 9 месяцев назад +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.

  • @winterqq1270
    @winterqq1270 9 месяцев назад +3

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

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +1

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

  • @hut_fire1490
    @hut_fire1490 8 месяцев назад

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

  • @robolist2277
    @robolist2277 9 месяцев назад +1

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

  • @sangilyun234
    @sangilyun234 9 месяцев назад +1

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

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +1

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

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

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

    • @LachlanMiller
      @LachlanMiller  8 месяцев назад +1

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

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

    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

  • @saeedjalali7339
    @saeedjalali7339 9 месяцев назад +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  9 месяцев назад

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

  • @joaopslins
    @joaopslins 8 месяцев назад

    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  8 месяцев назад +1

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

    • @joaopslins
      @joaopslins 8 месяцев назад +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 🙇

  • @approxahmed
    @approxahmed 9 месяцев назад +1

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

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +1

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

  • @6peekaboo9
    @6peekaboo9 9 месяцев назад +1

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

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

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

  • @aaravsibbal8568
    @aaravsibbal8568 9 месяцев назад +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  9 месяцев назад

      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

  • @johnm8358
    @johnm8358 9 месяцев назад +2

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

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +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 9 месяцев назад

      @@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

  • @nader2560
    @nader2560 9 месяцев назад +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  9 месяцев назад

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

  • @letscode4277
    @letscode4277 Месяц назад

    where's the book man? I've been waiting for some time!
    Good luck with it.

    • @LachlanMiller
      @LachlanMiller  Месяц назад +1

      I will work on it again soon. I ended up going back to college for a masters which consumed my whole life but that will finish mid Nov!!

  • @recursion.
    @recursion. 9 месяцев назад +1

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

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +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. 9 месяцев назад

      and also would love videos on JS testing frameworks too.

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

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

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

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

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

    Very easy to understand and thorough, subscribed!

  • @kevinisaac4958
    @kevinisaac4958 6 месяцев назад +1

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

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

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

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

      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 9 месяцев назад

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

  • @vitaliiruzhentsov9220
    @vitaliiruzhentsov9220 9 месяцев назад +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  9 месяцев назад

      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 ⚡️

  • @JaLikon65
    @JaLikon65 9 месяцев назад +1

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

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

      Thanks! More deep dive content soon!

  • @boubaker86
    @boubaker86 8 месяцев назад

    Very informative video
    PS: I like your keyboard layouts

    • @LachlanMiller
      @LachlanMiller  8 месяцев назад

      hi! what do you mean keyboard layouts?

  • @rajmajumdar5253
    @rajmajumdar5253 9 месяцев назад +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  9 месяцев назад

      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 9 месяцев назад +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  9 месяцев назад

      @@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

  • @whatplan4335
    @whatplan4335 9 месяцев назад +6

    great content
    1080p please

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +2

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

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

      @@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  9 месяцев назад

      @@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 🚀

  • @harikotha7
    @harikotha7 8 месяцев назад

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

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

    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  9 месяцев назад +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 9 месяцев назад

      @@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 8 месяцев назад

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

  • @gkiokan
    @gkiokan Месяц назад

    I did bundle with grunt at the very beginning where nothing else existed, then webpack and I stay at webpack until it breaks something specially. Never change a good running system. So Vite does sound good, but I would never refactor my bundle process on a existing process. So I will wait wait wait and wait until it's mature enough. For new Projects, it's worth maybe the try. Just my 2 cents.

  • @sazk4000
    @sazk4000 9 месяцев назад +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  9 месяцев назад

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

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

    Super helpful, thank you!

  • @Yogesh-kr7bo
    @Yogesh-kr7bo 9 месяцев назад +1

    what theme is that in vscode btw nice video

  • @angjonsehrik7561
    @angjonsehrik7561 9 месяцев назад +1

    Would love to see video about vitest

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

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

  • @wick2op
    @wick2op 9 месяцев назад +1

    Quality content. You gained a subscriber

  • @cariyaputta
    @cariyaputta 4 месяца назад

    Thanks. Quality explanation.

  • @RaviGILL-s1f
    @RaviGILL-s1f 26 дней назад

    Such a great video ❤

  • @al1gned
    @al1gned 9 месяцев назад +1

    Subbed, keep the content coming!

    • @LachlanMiller
      @LachlanMiller  9 месяцев назад +1

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

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

      @@LachlanMiller quality over quantity, any day :)

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

      YES!!@@al1gned

  • @Mr.x.187
    @Mr.x.187 9 месяцев назад +1

    Thanks for this video!

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

      Thanks for the encouragement I appreciate it!!

  • @alexanderzin
    @alexanderzin 5 месяцев назад +1

    This is gold

  • @MouseCodes
    @MouseCodes 9 месяцев назад +1

    Great content🎉

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

    You earned a sub. Great explainer

  • @threolin
    @threolin 8 месяцев назад

    Thanks! Quite informative!

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

    It was well explained and helpful

  • @anasouardini
    @anasouardini 9 месяцев назад +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  9 месяцев назад +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 9 месяцев назад

      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  9 месяцев назад

      @@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.

  • @anuragpramanik6095
    @anuragpramanik6095 8 месяцев назад

    Thanks for this informative video.

  • @anavgengineer
    @anavgengineer 8 месяцев назад

    Good one and to the point❤

  • @deepfuchsia7204
    @deepfuchsia7204 8 месяцев назад

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

    • @LachlanMiller
      @LachlanMiller  8 месяцев назад +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

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

    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  9 месяцев назад +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 😅

  • @adnandev_
    @adnandev_ 9 месяцев назад +1

    Incredible content keep it up please

  • @armynyus9123
    @armynyus9123 8 месяцев назад

    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...

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

    very usefull stuff. please make some deep concepts behind this

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

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

  • @marknielsen4494
    @marknielsen4494 4 месяца назад

    Excellent

  • @MuhammadIbrahim-x3h
    @MuhammadIbrahim-x3h 3 месяца назад

    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
    └── ...

  • @eleah2665
    @eleah2665 8 месяцев назад

    Great. Thanks.

  • @wobsoriano
    @wobsoriano 9 месяцев назад +1

    Youre a legend

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

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

  • @MeerUzairWasHere
    @MeerUzairWasHere 9 месяцев назад +1

    Great!

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

    Thanks

  • @codingprograms2078
    @codingprograms2078 9 месяцев назад +1

    Tough af 💪 ❤

  • @assertnotnull
    @assertnotnull 8 месяцев назад

    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  8 месяцев назад

      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 8 месяцев назад

      @@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 9 месяцев назад

    Vitest is a nightmare

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

      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 9 месяцев назад

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