Coding Shorts: Building with Vite - Customizing Production Builds

  Рет қаралды 17,613

Shawn Wildermuth

Shawn Wildermuth

2 жыл бұрын

I've been using Vue (via Vite) with ASP.NET Core lately and I needed to build for testing and production. While I'd gotten comfortable with the Vue-CLI to customize the build, it was time to learn now Rollup works with Vite to customize my build. Take a look and what I came up with.
If you like this video, you might like other videos in my Instructional Videos:
- • Instructional Videos
Or my Pluralsight Courses:
- shawnl.ink/psauthor

Пікірлер: 62
@emanuelturis4132
@emanuelturis4132 2 жыл бұрын
Thank you very much! I'm using Vite to build a WordPress plugin with React and this video helped me get over a crucial part of it!
@swildermuth
@swildermuth 2 жыл бұрын
Glad it helped!
@dionedde
@dionedde 2 жыл бұрын
sir, you got a new follower. You have a really good didactics. Your talk speed, non use of unecessary words and objectivityness amazingly help to mantain the focus. Also you does explain details (the whays) that the most would just pass, which is a huge plus content.
@emaaadelgado
@emaaadelgado 2 жыл бұрын
You literally saved me, i spent several ours looking for some explanation like this. THANKS a lot! You got a new follower and a new like!
@johnyepthomi892
@johnyepthomi892 Жыл бұрын
Thank you man. You're delivery style is invaluable. I Hope you keep making content with the same on point delivery. The way things are taught can either make it harder and demotivate someone or make it easier to learn and keep moving forward. I dislike content creators that intentionally or unintentionally intorduces complexity to what could have been explained in an easier way. I appreciate folks like you that makes it easier to keep moving forward rather than be stuck on config issues etc. Theres a lot to take in in this space as it is , and the more non core tasks are made easier, the more productive everyone can be. Thanks again.
@qubi
@qubi 2 жыл бұрын
thank you so much for this video, it was basically exactly what i needed
@mackenmd
@mackenmd 2 жыл бұрын
Well done - great introduction! Thank you, sir.
@swildermuth
@swildermuth 2 жыл бұрын
Thank you kindly!
@VigneshBhaskar
@VigneshBhaskar Жыл бұрын
Thank you very much for this useful info.
@swildermuth
@swildermuth Жыл бұрын
You are welcome!
@alvinyanson
@alvinyanson Жыл бұрын
Great video on customizing production builds with Vite. I appreciate the tips and tricks you shared!
@swildermuth
@swildermuth Жыл бұрын
Glad you enjoyed it!
@63montywilliams50
@63montywilliams50 Жыл бұрын
having a similar issue and stumbled upon this video for the solution. Good content!
@sivertskarning2129
@sivertskarning2129 2 жыл бұрын
Fantastic! Very good explanation.
@nzuzomal4545
@nzuzomal4545 3 ай бұрын
This was amazing!
@swildermuth
@swildermuth 3 ай бұрын
Thanks!
@ravi_verma31
@ravi_verma31 3 ай бұрын
Amazing Explaination
@swildermuth
@swildermuth 3 ай бұрын
Glad it helped!
@MobiusCoin
@MobiusCoin Жыл бұрын
OMG This video is a godsend. I'm trying to replace webpack as my bundler but Vite very much seems like it was build for Node-based SPAs in mind. I just need some scss and ts processed so that my WordPress themes can enqueue them and I could not for the life of me figure out how to do just. Again this video is amazing!
@smvnt3803
@smvnt3803 Жыл бұрын
This helped a lot! Thank you so much.
@swildermuth
@swildermuth Жыл бұрын
Glad it helped!
@jaidervanegas255
@jaidervanegas255 Жыл бұрын
Great job!
@glidelos84
@glidelos84 2 жыл бұрын
excellent explanation!!!
@saioabikandi9884
@saioabikandi9884 2 жыл бұрын
Very easy to understand, thanks :)
@aniket0aniket
@aniket0aniket 2 жыл бұрын
Thanks for the explanation. this was helpful.
@swildermuth
@swildermuth 2 жыл бұрын
You're welcome!
@luisangelcortinaalmeida2210
@luisangelcortinaalmeida2210 Жыл бұрын
Literally saved me hours of work!!!
@swildermuth
@swildermuth Жыл бұрын
Awesome
@ivanotero2050
@ivanotero2050 Жыл бұрын
Thks for your time, excelent video
@swildermuth
@swildermuth Жыл бұрын
Glad you enjoyed it!
@paws7983
@paws7983 Жыл бұрын
Thank you so much for this video!
@swildermuth
@swildermuth Жыл бұрын
You are so welcome!
@lazarkulasevic
@lazarkulasevic 2 жыл бұрын
Thanks for the tutorial
@shubhamwalhekar9356
@shubhamwalhekar9356 Жыл бұрын
Thanks Brother!! You saved us
@sandan3
@sandan3 Жыл бұрын
Very cool! I'd be interested to see a video on how to integrate internationalization with vite, pinia and a cms
@codescandy
@codescandy Жыл бұрын
Thank you so much.
@swildermuth
@swildermuth Жыл бұрын
Always welcome
@barneysmith
@barneysmith Жыл бұрын
thank you. i was playing around with vite but couldn't get rid of the hashes in the filenames, which made it very useless for me. i will now try it again.
@ravindrayr1232
@ravindrayr1232 2 жыл бұрын
Great helped me lot, i am moving away from webpack
@swildermuth
@swildermuth 2 жыл бұрын
Cool!
@muhammaddarwis8745
@muhammaddarwis8745 2 жыл бұрын
can you show me how to setting up the environment of ASP .net core 6 with vite + vue 3..
@mohitsoni3819
@mohitsoni3819 4 ай бұрын
Sir You gain one more subscriber for helping me
@federicotarasco797
@federicotarasco797 2 жыл бұрын
Thx for the explanation! I don't understand how to build my app and include, in the building process, all the things (pages, services and components) I've created inside src folder. Could you help me with that please?
@ranavitaln
@ranavitaln 2 жыл бұрын
Thank you very much!!!! can you show how intgrate in vs 2019 mvc ?
@swildermuth
@swildermuth 2 жыл бұрын
Video coming on how to do that.
@cnikolov
@cnikolov 2 жыл бұрын
Im still using webpack because of the documentation and the tons of plugins it has to offer
@swildermuth
@swildermuth 2 жыл бұрын
No reason to move if you're comfortable. I've moved to Vite because it's so much faster for development and so this seemed like a natural direction with it.
@vigilantezack
@vigilantezack 2 жыл бұрын
I'm not sure how entry points work for dev or production/build when used in another context (like WordPress plugin). Since the PHP framework is outputting the pages dynamically with PHP, my Vue app doesn't really have one little html entry point or one to compile with the transformed filenames and paths and such. How would I go about developing without using a single html entry point file, but instead require the entire PHP framework to run in order to run my app? In other words, WordPress has to run, which runs the theme and displays the pages where I output shortcode which then runs my plugin which then outputs the Vue stuff. So my entry point is a dynamic page created by WP, not one html file in my Vue project folder. I can't find much info about using any other kind of "entry" beside an html file in the project root.
@ontheruntonowhere
@ontheruntonowhere Жыл бұрын
I don't know how Vue works specifically, but I think it's similar to React, in which your entry point is an ID in the page template. If you're working on a WP plugin or theme, use Shawn's method of stripping the hash from your build files, load your assets as you normally would using wp_enqueue_script(), and target the ID in your PHP template.
@jonwinder6622
@jonwinder6622 Жыл бұрын
I got a good video topic for this channel. Vite 4 tutorial. There isnt a SINGLE one out there.
@swildermuth
@swildermuth Жыл бұрын
Interesting, i'll add it to the list.
@jonwinder6622
@jonwinder6622 Жыл бұрын
@@swildermuth Guaranteed traffic. Not a single tutorial out there.
@swildermuth
@swildermuth Жыл бұрын
Until I get a video on it, I do have an article about it (not v4 though, but most is still the same): www.codemag.com/Article/2109071/Introducing-Vite-A-Better-Vue-CLI
@thetpaingsoe1423
@thetpaingsoe1423 9 ай бұрын
Thanks for your awesome video. It is really help me. But i got one problem with browser caching. For example, i uploaded index.js and it work fine. But later i edited something and uploaded edited index.js. There, my browser i only loading the index.js from cache. So, my latest changes are not working well in my browser. It work only when i clean the browser cache or i open with private window. Do you have any suggestion? Thanks
@swildermuth
@swildermuth 9 ай бұрын
Not sure what you're using for the server-side, but in general you'll need to use a cache busting solution (e.g. yourfile.js?b=;alskdjf;laksd) or enable the cache busting that is built into vite. Production builds should do this by default but I think I may have told you to remove in the example. Search for Vite + Cache Busting and you'll see good examples.
@thetpaingsoe1423
@thetpaingsoe1423 9 ай бұрын
@@swildermuth Thanks for your reply. I will check it out. But for now, i re-enabled the hash key in vite config for production.
@timshaq
@timshaq 16 күн бұрын
where minify
@swildermuth
@swildermuth 13 күн бұрын
Not sure this has anything to do with minifying. What's the context?
@balishittin7484
@balishittin7484 2 жыл бұрын
You scare me
@migueljara9399
@migueljara9399 2 жыл бұрын
why
@balishittin7484
@balishittin7484 2 жыл бұрын
@@migueljara9399 Idk he is looking exactly to my eyes and IDK talks very calm
@sania3631
@sania3631 2 жыл бұрын
Senior developers must be and look serious.
Coding Shorts: Angular Template Forms
11:31
Shawn Wildermuth
Рет қаралды 676
Coding Shorts: Using the Vite PWA Plug-in
14:05
Shawn Wildermuth
Рет қаралды 24 М.
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,4 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 58 МЛН
Coding Shorts: .NET Aspire - Databases
10:52
Shawn Wildermuth
Рет қаралды 3,7 М.
Explains Module Bundlers in 3 Levels of Difficulty
18:35
lihautan
Рет қаралды 12 М.
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 707 М.
Coding Shorts: C# Dialects and Idioms
19:13
Shawn Wildermuth
Рет қаралды 3,2 М.
Pinia Simplified
4:28
LearnVue
Рет қаралды 120 М.
Vue 3 Script Setup Tutorial - This Changes Everything!
23:40
Make Apps with Danny
Рет қаралды 60 М.
What is React.js? Get started with React using Vite
18:22
Sam Meech-Ward
Рет қаралды 18 М.
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,2 МЛН