app_dev's avatar

Mix succeeds but bootstrap 5 won't load.

app.scss

// Fonts
@import url('https://fonts.googleapis.com/css?family=Nunito');

// Variables
@import '../variables';

// Bootstrap
@import '~bootstrap/scss/bootstrap';

Webpack Mix JS

const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.sass('resources/sass/app.scss', 'public/css')
    .sass('resources/sass/admin/app.scss', 'public/css/admin')
    .js('resources/js/app.js', 'public/js')
    .js('resources/js/admin/app.js', 'public/js/admin')
    .sourceMaps()
    .vue()
    .version();

Use Vue 3, Use Vue Router 4, Use Bootstrap 5,

All files are compiled successfully by "mix". However, bootstrap does not work and does not give an error.

0 likes
2 replies
app_dev's avatar

@SilenceBringer Thank you. Sometimes I forget while working on the project. Actually I forgot to add "rel" to the link tag.

Please or to participate in this conversation.