Reputation: 1
I'm a Laravel newbie, and I was trying to import Bootstrap 4 automatically with npm install
and npm run dev
(after setting Bootstrap with its proper version into package.json) just as I saw in some Laravel classes I'm watching.
The problem is that after I use both commands, app.css is empty. Here's what I did this far.
composer create-project --prefer-dist "laravel/laravel" cadastro
Configuring package.json ("bootstrap": "^4.3.1")
npm install
npm run dev
Is there something wrong with my steps? My Laravel version is 6.5.2.
Upvotes: 0
Views: 4322
Reputation: 111839
You should run
composer require laravel/ui --dev
php artisan ui bootstrap
commands in your console to have some initial JS file with Bootstrap setup. Otherwise if resources/js/app.js
file is empty, importing like this won't be enough.
You should read documentation about this.
Upvotes: 2