Closed Spaubleit closed 2 years ago
I have the same issue, it only happens with 3.2.0
.
Here's a workaround for nuxt
projects:
nuxt.config.js
file pointing to the dist
version of vca
:
// nuxt.config.js
build: {
extend (config, { isServer }) {
config.resolve.alias['@my-custom-alias'] = `vue-tsx-support/dist/${isServer ? 'cjs' : 'esm'}/vca`
}
}
tsx.d.ts
in your project and use the same custom alias for the module name:
// tsx.d.ts
declare module '@my-custom-alias' {
export * from 'vue-tsx-support/lib/vca'
}
vue-tsx-support/lib/vca
imports with your custom alias @my-custom-alias
// import * as vca from "vue-tsx-support/lib/vca"
import * as vca from "@my-custom-alias"
Note: We could have added vue-tsx-support/lib/vca
as the alias target directly but it won't work in the ssr
mode. (https://github.com/nuxt/nuxt.js/issues/3439)
Thank you! It works with with this changes. Sorry for long response. I was away from that project.
Hi. I try to use this library with nuxtjs. But I get error when I try example:
I get build error like this: