본문으로 바로가기

[Vue.js] Vue-Cli 3/4 에서 BootStrap 설치 방법

category Front End 2021. 1. 12. 13:56

 

1. bootstrap, Popper.js, jQuery 설치 (popper, jquery는 Bootstrap 의 dependency이다. )

  - npm install bootstrap popper.js jquery

   - jquery 설치는 오른쪽 링크를 참고(duriduriduri.tistory.com/7)

 

2. main.js 수정

  - import 'bootstrap' 추가

import { createApp } from 'vue'
import App from './App.vue'
import jQuery from 'jquery'
import 'bootstrap'
...

 

stackoverflow.com/questions/42684661/adding-bootstrap-to-vue-cli-project

 

stackoverflow.com/questions/57459917/how-to-fix-this-error-module-not-found-cant-resolve-popper-js

 

How to fix this error : " Module not found :can't resolve popper.js "

After import the Bootstrap and Jquery this error is showning when compiling. import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import 'bootstrap/dist/css/bootst...

stackoverflow.com