├── .gitignore
├── dist
├── bundle.js
└── index.html
├── package.json
├── src
├── app.js
└── scss
│ └── app.scss
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Hello World
10 |
11 |
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-webpack",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "webpack",
8 | "test": "echo \"Error: no test specified\" && exit 1"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "MIT",
13 | "devDependencies": {
14 | "autoprefixer": "^7.2.5",
15 | "css-loader": "^0.28.9",
16 | "exports-loader": "^0.6.4",
17 | "node-sass": "^4.7.2",
18 | "postcss-loader": "^2.0.10",
19 | "sass-loader": "^6.0.6",
20 | "style-loader": "^0.20.1",
21 | "webpack": "^3.10.0"
22 | },
23 | "dependencies": {
24 | "bootstrap": "^4.0.0",
25 | "jquery": "^3.3.1",
26 | "popper.js": "^1.12.9"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/app.js:
--------------------------------------------------------------------------------
1 | import 'bootstrap';
2 | import './scss/app.scss';
--------------------------------------------------------------------------------
/src/scss/app.scss:
--------------------------------------------------------------------------------
1 | @import "~bootstrap/scss/bootstrap";
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = {
4 | entry: './src/app.js',
5 | output: {
6 | filename: 'bundle.js',
7 | path: path.resolve(__dirname, 'dist')
8 | },
9 | module: {
10 | rules: [
11 | {
12 | test: /\.(scss)$/,
13 | use: [
14 | {
15 | // Adds CSS to the DOM by injecting a `