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

Add fix for breaking createElement name change #12

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

b12f
Copy link
Contributor

@b12f b12f commented Jul 1, 2020

The first VCA beta was released yesterday, and it included a breaking change renaming createElement to h

https://github.com/vuejs/composition-api/releases/tag/v1.0.0-beta.1

The first VCA beta was released yesterday, and it included a breaking change renaming `createElement` to `h`

https://github.com/vuejs/composition-api/releases/tag/v1.0.0-beta.1
@anncwb
Copy link

anncwb commented Jul 2, 2020

@b12f Tried your change, it doesn't seem to work

@b12f
Copy link
Contributor Author

b12f commented Jul 2, 2020

What's your testing setup? I used a basic vue-cli generated project with TypeScript preserveJSX: true and edited this file in node_modules. The build ran where it didn't before

@anncwb
Copy link

anncwb commented Jul 2, 2020

My mistake, because the local babel cache is not cleared

@antfu
Copy link

antfu commented Jul 5, 2020

You might need to change this line as well

        const hasH = vcaImportNodes.some(p => (
            p.specifiers.some(s => (
-                t.isImportSpecifier(s) && s.imported.name === 'createElement' && s.local.name === 'h'
+                t.isImportSpecifier(s) && s.local.name === 'h'
            ))
        ));

@b12f
Copy link
Contributor Author

b12f commented Jul 6, 2020

You might need to change this line as well

        const hasH = vcaImportNodes.some(p => (
            p.specifiers.some(s => (
-                t.isImportSpecifier(s) && s.imported.name === 'createElement' && s.local.name === 'h'
+                t.isImportSpecifier(s) && s.local.name === 'h'
            ))
        ));

Thanks I think you're right, I changed it

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.

4 participants