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

Updates and fixes for vue 3 #1

Open
wants to merge 2 commits into
base: vue-3.x
Choose a base branch
from
Open

Conversation

zchtodd
Copy link
Owner

@zchtodd zchtodd commented Jul 11, 2022

This PR contains fixes that got the Berbix Vue integration working locally with Vue 3.

I think we'll need to maintain this as a separate branch so as not to break existing Vue 2 integrations.

I haven't used Vue before, so please correct me if there's an easier approach here. I did see the vue-compat package on NPM, but I believe that's something the app developer would need to incorporate, and not our SDK.

"presets": [
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure why I needed to do this, but the ES6 style import statements were complaining about not being able to find a default export, until I made this change.

scrolling: "no",
referrerpolicy: "no-referrer-when-downgrade",
},
src: this.frameUrl(),
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this was due to Vue2->Vue3, but with attrs as an object, it was appearing as attrs='[Object object]' on the iframe tag, rather than as the individual attributes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe related, but it looks like people were running into a similar issue with the vue router when upgrading 2 -> 3. Either way your fix seems like the way to go.

src/index.js Outdated
@@ -1,3 +1,5 @@
import { h } from 'vue';

const SDK_VERSION = "1.0.1";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to bump this a major version? (Maybe 3 to match Vue?)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, good catch, forgot to bump it.

Copy link

@andrewsli andrewsli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also no Vue experience here, but the changes look reasonable.

scrolling: "no",
referrerpolicy: "no-referrer-when-downgrade",
},
src: this.frameUrl(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe related, but it looks like people were running into a similar issue with the vue router when upgrading 2 -> 3. Either way your fix seems like the way to go.

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

Successfully merging this pull request may close these issues.

3 participants