[Vuejs]-How to integrate bootstrap 5 in nuxtjs?

1๐Ÿ‘

โœ…

I followed some older StackOverflow answers and managed (I think) to create working demo with newest Nuxt 3 and Bootstrap 5 like this:

https://stackblitz.com/edit/github-bebg1r-j6lqxm

The key things:

  1. In package.json add and install dependencies for bootstrap, sass and sass-loader
  2. Create .scss file in /assets folder containg @import 'bootstrap/scss/bootstrap';
  3. Load this file in nuxt.config.ts via css: ['~/assets/main.scss']
  4. Plugin to load JS bundle in /plugins/bootstrap.client.ts
๐Ÿ‘คEllrohir

Leave a comment