Hashaam zahid
Hashaam zahid

Reputation: 325

How to Compile Bootstrap Theme Scss Files in Laravel

I have bit knowledge about how to compile scss file using npm run dev. But now I have Bootstrap html theme folder where all assets files are included like scss and css . i am confused that is i have to @import all bootstrap theme folder scss files name in laravel app.scss file for compile or just copy Bootstrap theme folder scss files and paste on laravel assets/scss folder and run command npm run dev. please help thanks

Upvotes: 0

Views: 1577

Answers (1)

FirstIndex
FirstIndex

Reputation: 159

In your resources/sass/app.scss file or any other file you want to have the theme files included, add the following line of code

@import '~bootstrap/scss/bootstrap';

This line of code includes all bootstrap scss files that can be found in the node_modules/bootstrap/scss/bootstrap folder. If you have a custom directory for your scss files you can include them like this

@import 'custom_folder/bootstrap-saa/assets/stylesheets/bootstrap";

Do not forget to add the entry into your webpack.mix.js file in your root folder.

mix.sass('resources/sass/app.scss', 'public/css');

Upvotes: 1

Related Questions