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

Specify Vue Library #2722

Closed
heywhy opened this issue Apr 26, 2023 · 3 comments
Closed

Specify Vue Library #2722

heywhy opened this issue Apr 26, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@heywhy
Copy link

heywhy commented Apr 26, 2023

Currently, the vue-language-core assumes that everyone uses Vue, so, it does not cater for projects that make use of a custom renderer.

I will suggest that one is allowed to specify the package to use as part of tsconfig. What this means is that, the below function either makes use of the specified vueLibrary (see nativescript-vue/nativescript-vue#1038) or default to vue.

return vueVersion < 2.7 ? '@vue/runtime-dom' : 'vue';

@johnsoncodehk johnsoncodehk added the enhancement New feature or request label Apr 27, 2023
@johnsoncodehk
Copy link
Member

Do you think "lib" would be a better option name?

@heywhy
Copy link
Author

heywhy commented Apr 27, 2023

that works too, as long as one is able to specify the custom renderer for intellisense purposes 😄

@heywhy
Copy link
Author

heywhy commented Apr 27, 2023

@johnsoncodehk Thank you for the updates, hopefully, we get a new release soon. Also, I will like to mention that you missed extending this new feat to the optionsWrapper option, see below:

optionsWrapper: vueOptions.optionsWrapper ?? (
target >= 2.7
? [`(await import('vue')).defineComponent(`, `)`]
: [`(await import('vue')).default.extend(`, `)`]
),

Instead of import('vue') we should be having import('${resolvedLib}'). I hope this fix comes with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants