Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !28643

change how bootstrap can be imported in bundlers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge jo-webpack-bundlers into master 6 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: Johann-S

Update how we can import Bootstrap according to our latest moves (removing jQuery, ESM)

Compare
  • master (base)

and
  • latest version
    7ae4a7d7
    1 commit, 2 years ago

1 file
+ 6
- 5

    Preferences

    File browser
    Compare changes
site/content/docs/4.3/getting-started/webpack.md
+ 6
- 5
  • View file @ 7ae4a7d7

  • Edit in single-file editor

  • Open in Web IDE


---
layout: docs
title: Webpack
description: Learn how to include Bootstrap in your project using Webpack.
title: Webpack and bundlers
description: Learn how to include Bootstrap in your project using Webpack or other bundlers.
group: getting-started
toc: true
---
@@ -15,13 +15,14 @@ toc: true
Import [Bootstrap's JavaScript]({{< docsref "/getting-started/javascript" >}}) by adding this line to your app's entry point (usually `index.js` or `app.js`):
{{< highlight js >}}
import 'bootstrap';
// You can specify which plugins you need
import { Tooltip, Toast, Popover } from 'bootstrap';
{{< /highlight >}}
Alternatively, you may **import plugins individually** as needed:
Alternatively, if you only need just a few of our plugins, you may **import plugins individually** as needed:
{{< highlight js >}}
import 'bootstrap/js/dist/alert';
import Alert from 'bootstrap/js/dist/alert';
...
{{< /highlight >}}
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
participants
Reference:
Source branch: jo-webpack-bundlers

Menu

Explore Projects Groups Snippets