Reputation: 192
I try to start a Laravel 5.4 project without Bootstrap.
After installing Laravel, I edited the following files:
resources/assets/js/app.js
require('./bootstrap');
package.json
...
"devDependencies": {
"axios": "^0.15.3",
"bootstrap-sass": "^3.3.7",
"jquery": "^3.1.1",
"laravel-mix": "^0.7.2",
"lodash": "^4.17.4",
"vue": "^2.1.10"
},
...
I've got the following error:
ERROR Failed to compile with 1 errors error in ./resources/assets/js/app.js
SyntaxError: /Users/.../package.json: Error while parsing JSON - Unexpected end of JSON input at JSON.parse () @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
Any suggestions?
Upvotes: 5
Views: 16749
Reputation: 6812
The line
require('./bootstrap')
has nothing to do with the Bootstrap CSS library. It loads the bootstrap.js file, which you will find in your assets. This file serves the purpose of "bootstrapping" your application (front-end). If you want to remove the Bootstrap CSS library from your project you should:
Upvotes: 10
Reputation: 449
I also wanted to get rid of bootstrap css codes in my laravel project. I opened the file
resources/sass/app.scss
and simply commented out the corresponding line as bellow
// Bootstrap
//@import '~bootstrap/scss/bootstrap';
Upvotes: 0
Reputation: 11
If you run "npm install" in the command line, bootstrap's sass files will be downloaded. Running "npm uninstall bootstrap-sass" afterwards will get rid of them.
Upvotes: 1
Reputation: 902
By default, Laravel 5.4 ships with Bootstrap and Vue.js scaffolding, but not everyone wants to use either of those technologies. With Laravel 5.5 you can run this if you don’t want any scaffolding to be generated out of the box by Laravel:
php artisan preset none
Upvotes: 13