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

Not working with Nuxt 3 #2

Open
lukasborawski opened this issue Nov 3, 2022 · 3 comments
Open

Not working with Nuxt 3 #2

lukasborawski opened this issue Nov 3, 2022 · 3 comments

Comments

@lukasborawski
Copy link

Hi, just used the plugin with Nuxt 3 and still get errors about types imports. My setup is below.

export default defineNuxtConfig({
  vite: {
    plugins: [ImportProps()],
  },
})
@liulinboyi
Copy link
Owner

Thanks for your feedback, I'll take a look😉

@liulinboyi
Copy link
Owner

liulinboyi commented Nov 6, 2022

Hi, just used the plugin with Nuxt 3 and still get errors about types imports. My setup is below.

export default defineNuxtConfig({
  vite: {
    plugins: [ImportProps()],
  },
})

Can you provide the Minimum Reproduction? The plugin can't use for every import type, the plugin only can resolve the type export in Unit Testing's case like:

export interface Foo {
    name: string,
}

or

export default interface Foo {
    age: number
}

or

interface Foo {
    age: number
}

export default Foo

or

export type Foo = {
  name: string
  age: number
  msg: string
  labels: unknown
}

Other import type will ignore, don't process the vue file.
Recommend not writing complex types.

@FranciscoKloganB
Copy link

FranciscoKloganB commented May 21, 2023

This plugin is no longer necessary if you bump Vue v3.3.0 or higher.

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

No branches or pull requests

3 participants