Skip to content
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

_botui.default is not a constructor while using parcel-bundler #139

Closed
IsaacHub opened this issue Apr 23, 2020 · 2 comments
Closed

_botui.default is not a constructor while using parcel-bundler #139

IsaacHub opened this issue Apr 23, 2020 · 2 comments

Comments

@IsaacHub
Copy link

I'm using with parcel, I installed it through npm, here is the code:

import BotUI from 'botui'
import Vue from 'vue'

let botui = new BotUI('bot', {
  vue: Vue 
});

Screenshot_23

@moinism
Copy link
Member

moinism commented Apr 25, 2020

Hey, seems like parcel is resolving the module from the client side so the BotUI instance is available on window object.

You can use it like this for now:

import _botui from 'botui'
import Vue from 'vue'

let botui = new window.BotUI('bot', {
  vue: Vue
});

@moinism moinism closed this as completed Apr 25, 2020
@IsaacHub
Copy link
Author

Original issue gone, and thrown other error You are using runtime build of vue so I changed the vue import to

import Vue from 'vue/dist/vue.esm.js';

It's fixed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants