در حال بارگذاری ...

Scaffolding Vite Project0:29

So let's quickly go over an example here. So let's install it with npm, and we don't have to install anything, we can just make use of npm directly. So let's grab this. And let's say, vite example. Okay, so that was pretty quick, you can see it took 2.6 seconds. And now we just have to cd into there, and run npm install, and then npm run dev when that's done. Okay, the npm install is done, let's open it up in VS Code. And then I'm going to run the dev server.

Running the Dev Server0:58

Okay, the npm install is done, let's open it up in VS Code. And then I'm going to run the dev server. And you'll see how quick it is, I won't edit this part out, npm run dev. And that took about 2 seconds. And now we have our app running at localhost:3000. So let's take a look at that. And there it is. So let's go over the scaffolded code. And let's go into the src folder here. And you can see the entry point here.

Reviewing Vue Scaffold Code1:27

And let's go into the source folder here. And you can see the entry point here. For Vue 3, it's very minimal, we have createApp imported from vue, we have our root component, and we have a CSS file. And then we're just calling createApp on the div with the ID of app. Here is the index.html skeleton, and there is the div with the ID of app. Here is our root component. And you can see an image being imported here and another HelloWorld component. And the component is in here HelloWorld. So you can see my linter complaining because in Vue 3, you are allowed to have multiple

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟