I'm trying to include the bootswatch flatly theme in my laravel/react project and no matter what I do, the bootswatch css doesn't end up in the public/app.css file as I'd expect.
I ran npm i bootswatch
and I've verified that I have bootswatch: ^4.4.1 in my package.json file. I have also run npm install.
I also ran these commands when initially setting up the project:
composer require laravel/ui
php artisan ui bootstrap
php artisan ui react
app.scss
Per the docs you set up the imports like this:
@import "~bootswatch/dist/flatly/variables";
@import "~bootstrap/scss/bootstrap";
@import "~bootswatch/dist/flatly/bootswatch";
webpack.mix.js
mix.react('resources/js/app.js', 'public/js').extract('jquery');
mix.sass('resources/sass/app.scss', 'public/css');
mix.styles('resources/css/custom.css', 'public/css/custom.css');
if (mix.inProduction()) {
mix.version();
}
app.blade.php
<script src="{{ mix('js/manifest.js') }}" defer></script>
<script src="{{ mix('js/vendor.js') }}" defer></script>
<script src="{{ mix('js/app.js') }}" defer></script>
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
<link href="{{ mix('css/custom.css') }}" rel="stylesheet">
When I open up the app.css file in a new tab and search for bootswatch I come up with nothing and the styles aren't being applied to the page. What am I missing?
I've cleared the cache and also run php artisan cache:clear
, although not sure that applies. Pretty much trying anything and everything at this point.
Bootstrap css is getting included in the public/css/app.css
file.