Skip to content

feat: add importSource option #284

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
merged 1 commit into from
Jul 5, 2022
Merged

feat: add importSource option #284

merged 1 commit into from
Jul 5, 2022

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