Install and use Bootstrap

First of all, let's install Bootstrap and its dependencies into our frontend directory by running the following command:

npm install jquery popper.js bootstrap --save

Once it is installed, we will need to import Bootstrap's compiled CSS into our application. There are many ways to import Bootstrap using webpack. The approach we will use here is to create a new entry in webpack to group all of the third-party styles into a single .css file. The following is the change to frontend/vue.config.js:

module.exports = {
...
configureWebpack: {
entry: {
app: './src/main.js',
style: [
'bootstrap/dist/css/bootstrap.min.css'
]
}
}
}

As you can see, we list the bootstrap.min.css file in the new entry, style. We will add styles of other third-party libraries here when needed. Now, if you execute npm run serve and open the login page at http://localhost:3000/login, you can see the font and size of the text TaskAgile has been changed to the style defined by Bootstrap's default theme.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.196