wonderful-panda / vue-tsx-support

TSX (JSX for TypeScript) support library for Vue
MIT License
560 stars 40 forks source link

Failed to import `enable-check` #91

Open keyakko opened 3 years ago

keyakko commented 3 years ago

Using this library with Nuxt.js will cause a fatal error.

Package subpath './enable-check' is not defined by "exports"
Screen Shot

I tried to import vue-tsx-support/enable-check into nuxt.config.ts. But when I start up the development environment, I get this error. This reproduction is here: https://codesandbox.io/s/vue-tsx-support-repro-import-issue-4o81s

medairbit commented 3 years ago

You need to add vue-tsx-support/enable-check.d.ts to the types array of your tsconfig

keyakko commented 2 years ago

Thanks for the response. I have tried the two patterns below. But it is not solved.

I think this error is occurred because enable-check is not exported in the package.json. https://github.com/wonderful-panda/vue-tsx-support/blob/6976afd342d1d3011a1eac7fa6627041bfe8feeb/package.json#L8-L19