SoFunction
Updated on 2025-04-05

vue3 global import bootstrap5 method

vue3 global import bootstrap5

Install

npm install bootstrap --save-dev
npm install jquery --save-dev

Introduced in

//Introduce jQuery and bootstrapimport 'jquery'
import 'bootstrap/dist/css/'
import 'bootstrap/dist/js/'

Configure jQuery

In, write the following code

const webpack = require("webpack")
 
 = defineConfig({
  	//Configure plug-in parameters	configureWebpack: {
		plugins: [
			//Configure the parameters of jQuery plug-in			new ({
				$: 'jquery',
				jQuery: 'jquery',
				'': 'jquery',
				Popper: ['', 'default']
			})
		]
	}
})

This will be available

vue3 global import bootstrap-icons issue

Install

npm i bootstrap-icons

Import in

import "bootstrap-icons/font/";

Summarize

The above is personal experience. I hope you can give you a reference and I hope you can support me more.