Skip to content

How to prevent this tool from bundling types from node_modules? #333

Closed Answered by ylc395
ylc395 asked this question in Q&A
Discussion options

You must be logged in to vote

I resolve this problem by patching vue@2.17.16:

diff --git a/node_modules/vue/types/vue.d.ts b/node_modules/vue/types/vue.d.ts
index f158cf0..74ce6f7 100644
--- a/node_modules/vue/types/vue.d.ts
+++ b/node_modules/vue/types/vue.d.ts
@@ -429,7 +429,7 @@ export interface VueConstructor<V extends Vue = Vue> {
   ): VueConstructor<V>
   mixin(mixin: VueConstructor | ComponentOptions<Vue>): VueConstructor<V>
   compile(template: string): {
-    render(createElement: typeof Vue.prototype.$createElement): VNode
+    render(createElement: CreateElement): VNode
     staticRenderFns: (() => VNode)[]
   }
 

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ylc395
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ylc395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants