Тёмный

Vue.js Tutorial From Scratch - e07 - NPM, Webpack & Single File Component 

Coder's Tape
Подписаться 61 тыс.
Просмотров 23 тыс.
50% 1

It's time for us to depart from the compiled CDN of Vue and start compiling our own assets with NPM and Webpack. We will be pulling in Laravel Mix but just for it's Webpack configurations. Finally, we are going to refactor into a Single-File Component.
For the best experience, follow along in our interactive school at www.coderstape...
Resources
Vue.js Documentation
vuejs.org/v2/g...
Download VSCode
code.visualstu...
DigitalOcean Referral
m.do.co/c/7dce...
Hit us up on Twitter with any questions or comments @codertape ( / coderstape )
About This Course
Modern applications require a robust Javascript framework. In this series, we are exploring Vue.js from scratch, covering all topics of writing Javascript code that is maintainable, performant and best of all powerful.

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@tayyabrasool7783
@tayyabrasool7783 4 года назад
I was working with Vue for almost a year but never had such a clear understanding that how things work. This explanation wraps it all. Thanks for the series.
@shumit
@shumit 5 лет назад
Magnificent !! As always, to the point and showing the errors and pitfalls that we novices may fall into while doing it. "Laravel Mix can be used independently" - this is the most illuminating lesson for me. Wow !! Once more, THANK YOU SO VERY MUCH !!!
@codingnetworks
@codingnetworks 2 года назад
Woow Thank you for this video. Was what i looking for. I had 3 days trying to understand Webpack and how to make it work. Laravel-mix is magical and i could it understand it thanks to you.
@josephajibodu38
@josephajibodu38 5 лет назад
You just made this so easy for me. And now I understand better what am doing, not just running CLI commands within an understanding of why am doing it. Thanks so much. Am loving this.
@h.serhan9862
@h.serhan9862 3 года назад
Error notice If you see the `Error time compiler error` so you just need to do the following: import Vue from 'vue/dist/vue.js'; instead of import Vue from 'vue'; And then type "npx mix" in the terminal and reload your document. I hope that helps.
@andrearimmaudo583
@andrearimmaudo583 5 лет назад
I encurred in a problem with cross-env. I solved it by run the command below the script section in laravel-mix docs, the command is "npm install cross-env --save-dev". I'm saying it cause I'm very loving your works and I think maybe other people find it useful. Thank you, Victor
@MunebYounis
@MunebYounis 5 лет назад
great i had same problem and your comment helped thanks a lot
@matejchmela
@matejchmela 4 года назад
The best explanation i've found. Perfect job, thank you.
@acedecastro83
@acedecastro83 5 лет назад
Auto-liker here! Thank you so much for uploading this topic sir. You are the best!
@CodersTape
@CodersTape 5 лет назад
Thanks! Enjoy.
@floflo111
@floflo111 4 года назад
great videos...very well explained... best vue tutorial
@mavbcn1790
@mavbcn1790 5 лет назад
Great tutorial, as always! Thanks so much Victor!
@adam192021
@adam192021 5 лет назад
The BEST as always!
@carlosmillanmazzucco1766
@carlosmillanmazzucco1766 3 года назад
Thank you so much! this explanation helped me a lot! love ur videos!
@dmdk8301
@dmdk8301 5 лет назад
Victor, great. Would appreciate if you focus on imports in vue-router. Dynamic imports i.e. If you have 20+ routes, you have to write 20+ import... and then component line. In cli project you can write import to component line, but it doesn't work with laravel mix. I did it, but it comes a trouble importing css. And paths... with @ ./ or tilda.. pain and headache each time. And different approaches through vue cli and laravel mix. It would be useful!
@emrozemorsalin5660
@emrozemorsalin5660 5 лет назад
insanely great! Keep up your good work
@ya-juchang5099
@ya-juchang5099 4 года назад
You are the best! Thank you so much!
@amancioaffiliates3911
@amancioaffiliates3911 5 лет назад
Thanks dude! Keep up the good work!
@craigtcooper777
@craigtcooper777 3 года назад
@Coder's Tape, have you had any luck doing this with Vue3? I've been really struggling figuring this out.
@SethSetiadha
@SethSetiadha 3 года назад
at 8:55 I have "Error: Unknown option '--hide-modules' anyone has same problem when running "npm run watch" ?
@LikeFunnyMovies
@LikeFunnyMovies 4 года назад
Great tutorial!
@gunterotte
@gunterotte 3 года назад
Hi, nice tutorials, thanks! Question dough. I'm very new in Vue, and wonder if Laravel Mix is similar to Vue-CLI nowadays? Afaik, Vue-CLI is compiling the project as well. Or is it a matter of preference?
@christianheisch8472
@christianheisch8472 4 года назад
You saved my day ... or week ;)
@ted9097
@ted9097 4 года назад
good stuff man.. a little hesitant about switching from roll-your-own webpack to laravel.mix but it seems nice. Do you know if it supports rust-wasm?
@clemensb8323
@clemensb8323 3 года назад
for anybody else who had a problem following at 6:10 (add app.js, save and quit): if you type in "vim app.js" you land in the vim editor. Type ":wq" (for save + quit) and hit enter. More information here: www.freecodecamp.org/news/the-linux-commands-handbook/#the-linux-vim-editor-command
@stephenpang4429
@stephenpang4429 4 года назад
Sorry, this video didn't work for me. Wasnt able to run npm run watch because it said "cross-env" could not be found, even though i did npm install. And yes i was in the correct directory.
@jandirporta8718
@jandirporta8718 3 года назад
I get an error that says: ERROR in ./src/components/Accordion.vue 1:0 Module parse failed: Unexpected token(1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See webpack.js.org/concepts#loaders > | | {{ item.title }}
@bphil4859
@bphil4859 5 лет назад
i use windows 10 os . in my project directory . i can not find yarn.lock file ? please help me
@MunebYounis
@MunebYounis 5 лет назад
what is the different this from Vue CLI ?
@CodersTape
@CodersTape 5 лет назад
The difference is that this can be mixed with other frameworks like with laravel. Where Vue CLI is pure Vue. We do talk about Vue CLI in episode 10 and it’s advantages.
@kevinmutinda8429
@kevinmutinda8429 4 года назад
Hey Great Tutorial... While trying pass value into the parent component I get an error--- [Vue warn]: Error in v-on handler: "ReferenceError: Value is not defined"
@kevinmutinda8429
@kevinmutinda8429 4 года назад
Can you help?
@kevinmutinda8429
@kevinmutinda8429 4 года назад
I found it to be more efficient removing the colon from the update:option.... its more efficient using @updateOptions
@joseluisburgon5390
@joseluisburgon5390 4 года назад
I want to customize my console like yours, Can you teach us how?
@CodersTape
@CodersTape 4 года назад
coderstape.com/blog/1-setting-up-laravel-in-ubuntu-digitalocean and scroll to the Extra Credit section which is at the very bottom.
@codingwithyoanes4304
@codingwithyoanes4304 4 года назад
hey man why my program there are error app.js:1370 [Vue warn]: Unknown custom element: but i already add components on my app.js, thanks for your help
@CodersTape
@CodersTape 4 года назад
I would make sure that your path is correct in app.js
@codingwithyoanes4304
@codingwithyoanes4304 4 года назад
@@CodersTape already fix it thanksss
@TheUndulyNoted
@TheUndulyNoted 4 года назад
A lot of these console commands do not work for me. Is it because I'm on windows?
@CodersTape
@CodersTape 4 года назад
Make sure you’re in the right directory.
@TheUndulyNoted
@TheUndulyNoted 4 года назад
@@CodersTape I am in the right one :/
@Angelo-jm6hr
@Angelo-jm6hr 4 года назад
Do i have to repeat all of it if i create a new project?
@CodersTape
@CodersTape 4 года назад
Not sure what part you are referring to but all projects will need some set up time at the beginning.
@Angelo-jm6hr
@Angelo-jm6hr 4 года назад
Okay now i get it😅 . Just had to ask that question because most of the time i don't have connection to the internet and was hoping to practice more vue offline. Thanks for the video btw. More blessings to your channel and to you sir.
@CodersTape
@CodersTape 4 года назад
@@Angelo-jm6hr Glad to help and thanks!
@shadow_3213
@shadow_3213 4 года назад
if you have a mac and want to install Vue.js make sure to install node.js and with it node.js will install npm automticaly make a folder named vueexample on your desktop open the terminal write the following in the command line cd desktop this brings you to the desktop now write the following in the command line cd vueexample this brings you into the folder where you now can install Vue with this: write the following in the command line vue create test if you tipe this in your terminal command line npm will create a new Vue Version with the name test in your vueexample folder during the installation you will be asked if you want to change some things change nothing and just hit enter to make sure you install a default version of Vue ONLY at the end of the installation you will be asked if you want this to be saved as a default now Type N before you hit enter in the command line, to make sure that the next times you make a new installation, you can deside yourself if you want changes during the installation by the way THANKS A LOT TO Coder's Tape for this SUPER SERIES !!!!!!!!!!!!!!
@alia.dhillon6224
@alia.dhillon6224 4 года назад
👏👏👏👍
@nicksmith678
@nicksmith678 3 года назад
Word of warning, mix has changed too much (installation is different and uses a different command line tool). Getting through this episode is almost impossible.
@anonymously-rex-cole
@anonymously-rex-cole 2 года назад
🥲
@saleheen12
@saleheen12 5 лет назад
I wish you changed your command line style. It's not very user friendly with all those blue yellow effect
@micosair
@micosair 5 лет назад
Javascript and and all its bullshittery is soooo... brittle.Composer is a miracle compared to npm.
@CodersTape
@CodersTape 5 лет назад
I feel the same way. Necessary evil though for the modern developer.
Далее
I Remade YouTube From Scratch Using Just Bash
17:51
Просмотров 14 тыс.
БАГ ЕЩЕ РАБОТАЕТ?
00:26
Просмотров 123 тыс.
Китайка стучится Домой😂😆
00:18
Mastering Vue.js and Vuex
46:01
Просмотров 85 тыс.
Become a bash scripting pro - full course
36:00
Просмотров 59 тыс.
Using docker in unusual ways
12:58
Просмотров 451 тыс.
Gitlab DELETING Production Databases | Prime Reacts
17:27
Vue 3 Crash Course | Project From Scratch
1:58:46
Просмотров 99 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 68 тыс.
БАГ ЕЩЕ РАБОТАЕТ?
00:26
Просмотров 123 тыс.