How to build and deploy with Vite JS

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

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

  • @daishokomiyama
    @daishokomiyama Год назад +3

    I totally agree with what you said. We should indeed focus on the code, rather than on tooling which might break the app. Building without relying on tooling is somehow a luxury for JS developers today.

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

    This was so helpful. I was working with Vite and had it hosted, but not sure why it was showing a blank page in production. It was making sure that the HTML/CSS/JS assets cross-origin related file path in the index.html was correct. Thank you!

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

    Thank you for focusing on the basics and keeping the demo realistic.

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

    really nice tutorial man, also you are so relaxed, i really enjoyed watching this video, good stuff man, big like :)

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

      Awesome - glad to see you like it

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

    thanks a lot for the clear tutorial, it's good to find something that actually works exactly how it's shown!

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

      Glad you found it useful and thank you for the kind words

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

    filled in a lot of gaps in my understanding of using vite - thanks!

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

      so glad to hear it was useful to you. cheers

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

    thanks! you are great, I was looking how to serve and this worked perfect, good to know about surge

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

      awesome glad you found it useful :)

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

    Really good tutorial!!

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

      Thank you for the kind words

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

    If am using this in the nextjs will it work

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

      hey thank you for taking the time to watch. Regarding Next.js I really am not sure since I have not tried it with this setup

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

    Nice video, I would rate it 10/10

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

    This tutorial was very good, thank you

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

      You welcome :) Glad you found it useful

  • @Samrood-bo9uo
    @Samrood-bo9uo Год назад

    failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/jsx". Strict MIME type checking is enforced for module scripts per HTML spec.

  • @x2l-skybb
    @x2l-skybb 3 года назад +1

    clear, precise and concise, thank you very much

    • @AdyNgom
      @AdyNgom  3 года назад

      Thank you Honore. Glad you found it useful and thanks for the kind words.

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

    good good very good... im noob to web dev but i understood everything )) .... thanks

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

      awesome glad you liked and understood it - makes it worth everything

  •  Год назад

    Hi!
    Thanks for this videotutorial.
    I want to know what if I install jQuery using npm install jquery --save when the npm... Do jQuery will be part of the final build?
    Thanks!

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

      technically yes. if you install and use it it should be part of the final package. The other case is if you install it and do not use it at all, it might discarded via tree shaking and not be part of the final bundle.

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

    Buen tutorial, señor Ady. Gracias.

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

    amazing tutorial thank you very much, I was wondering what if we wanted to manage image asset bundling, like specify bundling config in our app

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

      Vite is a build tool and has already created a workspace that would welcome such operations. I would add the image assets building as a build step and probably have it as script in the package.json

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

    I want to ask, i'm migrating from webpack to vite, when i try yarn serve everything works normally, but when deploy or yarn preview the app just loads, how to solve that? thank you

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

    So it looks like you can't develop a static multipage landing? For example, every page have its specific script with some unique logic. It means that I have to make different js files and link them into its html files. And it feels like it doesn't make sense then because I can do it without any bundler. It'll help only with a css preprocessors support out of the box, because when using gulp or webpack, you need to spend some time to configure it correctly.

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

    Thank you so much brother

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

      you are so welcome :)

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

    Great tutorial. Is there are way to change where the assets are saved for production? For example assets/js for JavaScript files, assets/css for styles, assets/images and so on..

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

      Sorry for the very late reply but to your question I would say yes. It might be a little involved since you might have to create custom scripts that can do this post or pre build and add the command to your package.json

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

    I would like to use a template engine like handlebars, Mustache or Nunjucks to modularize the html and import for example any partials inside the index.html. How can I do that?

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

    Hi, I'm deploying vitejs with express app to heroku and it's pointing to localhost.. what should be changed in the package.json scripts part?

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

      Vite has a great documentation about it. Please follow this link vitejs.dev/guide/static-deploy.html#heroku

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

    What do I need to learn beside js to understand vite? I don't understand the documentation

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

    Hi Ady, this is a super presentation but how do I make it multi page as that is cricial for me?

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

      Hello Alfred thank you for your kind words. Now are you building a simple static website with 6-10 pages or are you building a web application with routing and dynamic pages. I'm asking because Vite works with React or Vue and you could leverage the routing there if you are building a web application.
      If your use case is the static website route, what Vite currently have would not make sense if you have tons of pages but should work well with a small sample size. You can find out more here:
      vitejs.dev/guide/build.html#multi-page-app
      Cheers :)

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

      @@AdyNgom I am working on a large web applivcation with some 50 pages. I am an enthusiastic Vanilla Javascript user and am against any of the frameworks like Vue or React. I am getting a friend to formulate the routing though I like the link you sent

  • @cmnweb
    @cmnweb 3 года назад

    Hi, i using vite and nunjucks for templating but went I build don't render the other pages just the index, how can use vite for web pages?

    • @AdyNgom
      @AdyNgom  3 года назад

      hello I would start here with this great example from #basarat: ruclips.net/video/STeKBm67l6M/видео.html
      I'm not familiar with nunjucks but the Vite.js docs are pretty extensive.

  • @Venkateshganjiganji-qn2wm
    @Venkateshganjiganji-qn2wm Год назад

    Vitejs react serversideandclient code deploy Ela chyali

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

    What code extension do u use to auto complete or code tips ?

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

      I'm using Tabnine as an extension here. I have a full video about it here:
      ruclips.net/video/F7y1d2XG6PM/видео.html. Thank you so much for being a subscriber :) hope you find the content helpful

  • @abdulmomin-yq4mt
    @abdulmomin-yq4mt 2 года назад +1

    tnx

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

      you welcome :)

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

    Hi Bro, the code at timestamp 09.10 does not work in Windows when i run live server in "dist" folder. Please test in the Windows environment. I suggest that trainer should always consider running their code under the Windows environment, otherwise value of the course will fail. This can be proven when i look at the number of views you got. You should get more only if you also show the Windows option as well.

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

    50 Cent explaining vite js))

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

    Too lame, showing unecessary parts, taking too much time for unnecessary actions. !!