Skip to content

Conversation

sxzz
Copy link
Member

@sxzz sxzz commented Jul 3, 2022

Add an option importSource

In Vue 2.7, @vue/composition-api is no longer needed, it should be imported from vue.

Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

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

Thanks!

@haoqunjiang haoqunjiang merged commit abffc65 into vuejs:dev Jul 5, 2022
@sxzz sxzz deleted the feat/import-source branch July 5, 2022 08:35
@emosheeep
Copy link
Contributor

Does this API(importSouce) can be exposed to users since I've encountered a situation that, I need to make my lib compatible with both vue 2.6 and vue2.7 at the same time, so I used vue-demi. I should ensure that all of imports from vue should be redirected to vue-demi, but the plugin @vitejs/plugin-vue2-jsx which used @babel/preset-vue-jsx inside can't pass some options to control the import source. It will auto inject import {h} from 'vue' statements to the build result.

@sxzz
Copy link
Member Author

sxzz commented Jul 31, 2022

Maybe you can submit a PR for 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.

3 participants