Skip to content

Migration guide: Mention accessing createApp from a CDN build #774

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

Merged

Conversation

skirtles-code
Copy link
Contributor

Description of Problem

I've gone into depth about the problem in #773 but this PR is largely independent of the changes I've proposed there.

In summary, I saw a discussion on Discord where several users were getting confused about migrating a Vue 2 app to Vue 3. The confusion came from the difference between using ESM modules and a CDN build. They had read the migration guide for global API changes but hadn't fully appreciated the differences between ESM and CDN.

To make matters worse, the examples on that page keep flip-flopping between the two styles.

This may not seem like a migration problem but the API change is a significant contributor to the confusion. In Vue 2, everything was done via an object/function called Vue. In Vue 3, that object only exists for CDN builds. A familiar-looking object has completely changed roles and unless you grasp the difference between the builds it's really difficult to understand what's going on.

Proposed Solution

I've included an extra example near the top of the page that explicitly notes how a CDN build differs from the ESM example. It isn't much but I think it'd make a big difference to anyone who is only familiar with one way or the other.

Rewriting the examples on this page to all use the same style would probably be a good idea but I think that should be addressed as part of #773.

There's also an unrelated trailing-space change in the same file, correcting one of my previous changes.

@NataliaTepluhina NataliaTepluhina merged commit 567c9a8 into vuejs:master Jan 6, 2021
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.

2 participants