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.

Plugin doesn't import all sub-components

See original GitHub issue

Describe the bug

According to the documentation on plugins, importing a plugin should import all sub-components as well.

When importing as plugins, all subcomponents and related directives are imported in most cases. i.e. When importing <b-nav>, all the <nav-*> sub components are also included, as well all dropdown sub components.

I’ve added the following import:

import { FormPlugin } from 'bootstrap-vue'
Vue.use(FormPlugin)

However, when using form components like b-form-input or b-form-checkbox, I get error messages:

Unknown custom element: <b-form-input> - did you register the component correctly? For recursive components, make sure to provide the “name” option.

Did I misinterpret the documentation? Or does it simply not apply to b-form and I have to import every single form component I want to use individually?

Steps to reproduce the bug

  1. Use the above mentioned import
  2. Add a <b-form-input> to the page
  3. Check error console

Expected behavior

The form sub-components should be imported automatically.

Versions

Libraries:

  • BootstrapVue: 2.15.0
  • Bootstrap: 4.5.0
  • Vue: 2.6.11

Environment:

  • Device: Laptop
  • OS: Windows 10
  • Browser: Chrome
  • Version: 83.0.4103.116

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Hiwscommented, Jun 29, 2020

Someone made this loader https://www.npmjs.com/package/bootstrap-vue-loader, which goal was to automatically import only the components used, removing the need to manually importing them.

I haven’t tested it, and i don’t know how well it works. But you can try it if you want.

0reactions
sebastian-raubachcommented, Jun 29, 2020

Ok, thanks again. I was just wondering if there’s a less granular way of importing components.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue plugin doesn't work when directly imported in Components
Vue plugin doesn't work when directly imported in Components ; <script> ; import MyPlugin from './../myPlugin.js' export default { MyPlugin } ; </ ......
Read more >
When “adding required components”, be cautious of the ...
One of them got added with all subcomponents, probably since it's a custom table created in the same environment.
Read more >
Support for subcomponents | Jira Server and Data Center
I need to be able to assign the JIRA issue to a whole group of components, as well as individually to any component...
Read more >
Importer doesn't import all publications - WordPress.org
Hello! Great plugin but i have a problem. I have BibTex file with 1479 publications. For some reason when i try to import...
Read more >
Getting Started - BootstrapVue
This ensures padding does not affect the final computed width of an element, ... When importing as plugins, all subcomponents and related directives...
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