Estou com um problema ao executar o láravel vite. Fiz o passo a passo seguindo a documentação oficial do láravel, mas a página não carrega com o comando npm run dev. Aqui está meus arquivos que fiz alteração:
arquivo vite.config.js:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
arquivo web.php:
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
arquivo welcome.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body>
<h1>
Hello world!
</h1>
</body>
</html>
está faltando algum passo a passo? Estou querendo adicionar o bootstrap no láravel