-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Export individual components #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@nddery Thanks :) |
|
@pi0 any idea when we could expect an update to npm ? |
|
This implementation breaks the current API and results in import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
Vue.use(BootstrapVue);To make it work users will have to call it like this now. import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
Vue.use(BootstrapVue.default);at least this was the case for me in a browserify environment. |
|
@sourcec0de @nddery would you please check 94794f1 (v0.3.8) it may possibly fix both issues. |
|
@pi0 thats essentially the same thing as before. The only way this will work as expected is if you are exporting using this syntax. export {bBtn, bTabs};
export default plugin;This will create named exports for the individual components. Then when they are imported it would look something like this. import { bBtn } from 'bootstrap-vue'; // this will pull named export
import BootstrapVue from 'bootstrap-vue'; // this will pull default export |
|
@sourcec0de Would you please make a PR? |
|
@pi0 yea, I'm headed to bed for this evening but I'll submit one tomorrow morning. ~ Thanks for the hard work btw. Great job so far. |
This would allow us to import individual components instead of "using" the plugin on the main
Vueinstance.So, in addition of being able to use the whole plugin like before:
We could also instead import and use components individually.