TYPO3-Headless / nuxt-typo3

TYPO3 Frontend rendered in Vue.js and Nuxt (frontend for EXT:headless)
https://t3headless.macopedia.io/nuxt-typo3/
89 stars 35 forks source link

Documentation and or Bug: Wrong path for import type #334

Closed daUhradone closed 7 months ago

daUhradone commented 7 months ago

at: Documentation-> Layouts:

import { T3BackendLayout } from '@t3headless/nuxt-typo3'

The path goes to '/modules' and the type is not imported. I had to do a full path to '/types' to make it work.

'/home/thomas/CODE/Nuxt/nuxt-typo3/node_modules/@t3headless/nuxt-typo3/dist/types'

module.d.mts also exports the types but they are not recognized on import, TypeScript gives an error

The nuxt-typo3 module itself also uses '../../types' for its type imports.

mercs600 commented 7 months ago

We have released new version 2.0.2, due to changes in Nuxt 3.10.x. Now it should work.

We have also updated documentation to clarify that types should be imported with the type keyword: import type { T3BackendLayout } from '@t3headless/nuxt-typo3'

Feel free to reopen this issue if you have any questions.