4 | How to Set Up a Development Build with Laravel | Laravel for Complete Beginners
In this lesson, I will show a new Laravel project setup, and how to find various files inside the project. 🙂 We will also set up some environment variables, as well as create our first pages for our Laravel website.
➤ TIMESTAMPS
00:00:00 - How to set up a development server
00:02:24 - Install Node.js
00:03:49 - Changing the environment of our project
00:04:57 - Changing the vite.config.js
00:05:51 - Starting up our testing server
00:09:07 - How to get CSS working in the dev build
00:11:27 - Pushing the dev build changes into our production build
➤ HOW TO SET UP PACKAGE.JSON & VITE.CONFIG.JS
Use the terminal, and type this to create the package.json:
npm init -y
Then use this command to install the vite plugin:
npm install laravel-vite-plugin --save-dev
If you still do not have the vite.config.js file, just create it manually, and then paste this inside the file:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'resources/css/app.css',
'resources/js/app.js',
]),
],
});
➤ GET ACCESS TO MY LESSON MATERIAL! 👇
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon and YouTube Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Get lesson material using these links:
Memberships:
Patreon: https://www.patreon.com/mmtuts