question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bootstrap-vue will purged

See original GitHub issue

Hi, I’m trying to use purgecss with bootstrap-vue… I read about this in several related issues, but, I can not be successful.

  purgeCSS: {
    mode: 'postcss',
    paths: [
      'components/**/*.vue',
      'layouts/**/*.vue',
      'pages/**/*.vue',
      'plugins/**/*.js',
      'node_modules/bootstrap-vue/es/**/**/*.js',
      'node_modules/bootstrap-vue/**/*.js'
    ],
    styleExtensions: ['.css'],
    whitelist: ['body', 'html', 'nuxt-progress', 'navbar'],
    whitelistPatterns: [/^b-/, /nav/]
  },

  build: {
    extractCSS: true,
    ...
  }

index.vue

<template>
  <div>
    <b-navbar
      toggleable="md"
      type="dark"
      variant="info">

      <b-navbar-toggle target="nav_collapse"/>

      <b-navbar-brand href="#">NavBar</b-navbar-brand>

      <b-collapse
        id="nav_collapse"
        is-nav>

        <b-navbar-nav>
          <b-nav-item href="#">Link</b-nav-item>
          <b-nav-item
            href="#"
            disabled>Disabled</b-nav-item>
        </b-navbar-nav>

        <!-- Right aligned nav items -->
        <b-navbar-nav class="ml-auto">

          <b-nav-form>
            <b-form-input
              size="sm"
              class="mr-sm-2"
              type="text"
              placeholder="Search"/>
            <b-button
              size="sm"
              class="my-2 my-sm-0"
              type="submit">Search</b-button>
          </b-nav-form>

          <b-nav-item-dropdown
            text="Lang"
            right>
            <b-dropdown-item href="#">EN</b-dropdown-item>
            <b-dropdown-item href="#">ES</b-dropdown-item>
            <b-dropdown-item href="#">RU</b-dropdown-item>
            <b-dropdown-item href="#">FA</b-dropdown-item>
          </b-nav-item-dropdown>

          <b-nav-item-dropdown right>
            <!-- Using button-content slot -->
            <template slot="button-content">
              <em>User</em>
            </template>
            <b-dropdown-item href="#">Profile</b-dropdown-item>
            <b-dropdown-item href="#">Signout</b-dropdown-item>
          </b-nav-item-dropdown>
        </b-navbar-nav>

      </b-collapse>
    </b-navbar>
  </div>
</template>

#14 #5 lichter

could anyone help me?

thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bartcommented, Nov 29, 2019

I’m using tailwindcss instead of bootstrap now.

2reactions
bartcommented, Jul 4, 2019

Any update on this? I have the same problem with element ui in a nuxtJS project

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue.js - How do I whitelist everything I need for BootstrapVue ...
In an attempt to solve this, I installed nuxt-purgecss in the hope that it would extract all unused css from bootstrap.css, and bootstrap-vue....
Read more >
Is bootstrap-vue dead? : r/vuejs - Reddit
BootstrapVue was a legitimate solution for Vue 2 and Bootstrap 4 as they would not work together well out of the box.
Read more >
Optimizing CSS with PurgeCSS | Warren Lee
I think one thing you can try is to reduce the amount of unused CSS when you're using a type of Vue/CSS framework...
Read more >
[Solved]-How to stop BootstrapVue carousel cycling?-Vue.js
From bootstrap-vue docs: To pause the carousel from auto sliding, set the interval prop to 0. To restart a paused carousel, set the...
Read more >
How to add Tailwind CSS, Bootstrap ... - DEV Community ‍ ‍
In this tutorial, we will discuss how to add a CSS Framework to a Vue ... tailwind.config.js module.exports = { purge: [], darkMode:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found