Первый путь (сложный)
Вам необходимо установить последнюю версию Bootstrap 4
npm install bootstrap
https://getbootstrap.com/docs/4.1/getting-started/download/#npm
Импортируйте SASS Bootstrap, добавив эту строку в точку входа вашего приложения (обычно index.js или app.js):
import "~bootstrap/scss/bootstrap";
https://getbootstrap.com/docs/4.1/getting-started/webpack/#importing-styles
Импортируйте JavaScript Bootstrap, добавив эту строку в точку входа вашего приложения (обычно index.js или app.js):
import 'bootstrap';
или указать путь полностью
import 'bootstrap/dist/js/bootstrap';
или, если вы предпочитаете, требуют ()
require('bootstrap/dist/js/bootstrap');
В качестве альтернативы, вы можете импортировать плагины по мере необходимости:
import 'bootstrap/js/dist/util';
import 'bootstrap/js/dist/dropdown';
...
https://getbootstrap.com/docs/4.1/getting-started/webpack/#importing-javascript
Второй способ (легкий)
Просто подключите готовые js и css к своей странице https://getbootstrap.com/docs/4.1/getting-started/introduction/
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
</body>
</html>