PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, September 30, 2022

[FIXED] How to import boostrap v5 (js + css) into nuxt.js v2.14 with vue v3 project?

 September 30, 2022     bootstrap-5, nuxt.js, vue.js, vuejs3     No comments   

Issue

As of today, bootstrap-vue does not support vue v3 and bootstrap v5.

I would like to just import bootstrap files into nuxt v2.14 project. Could anyone give me a specific example how to accomplish this?

Since I just started vue/nuxt a week ago I would appreciate help at this point.

P.S. Emphasis on CSS and JS.


Solution

Add bootstrap 5 css and js files in assets directory under the folder bootstrap after downloading them then configure your nuxt.config.js :

export default {
   ...
     css: ['~/assets/bootstrap/bootstrap.min.css'],
     script: [
      {
        src: "~/assets/bootstrap/bootstrap.bundle.min.js",
        type: "text/javascript"
      }
     ]
    ...
}


Answered By - Boussadjra Brahim
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing