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

Export ParsedContent types #2349

Open
cco3 opened this issue Sep 28, 2023 · 0 comments
Open

Export ParsedContent types #2349

cco3 opened this issue Sep 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@cco3
Copy link

cco3 commented Sep 28, 2023

Is your feature request related to a problem? Please describe

Right now, the types in @nuxt/content/dist/runtime/types are not available in the package.json exports. This makes the eslint resolver choke when following the approach described in the docs.

import type { MarkdownParsedContent } from '@nuxt/content/dist/runtime/types'
[eslint]   1:1  error    Resolve error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './' is not defined by "exports" in /home/user/project/node_modules/@nuxt/content/package.json
[eslint]     at new NodeError (node:internal/errors:405:5)
[eslint]     at exportsNotFound (node:internal/modules/esm/resolve:359:10)
[eslint]     at packageExportsResolve (node:internal/modules/esm/resolve:695:9)
[eslint]     at resolveExports (node:internal/modules/cjs/loader:567:36)
[eslint]     at Module._findPath (node:internal/modules/cjs/loader:636:31)
[eslint]     at findModulePath (/home/user/project/node_modules/eslint-import-resolver-alias/index.js:99:27)
[eslint]     at exports.resolve (/home/user/project/node_modules/eslint-import-resolver-alias/index.js:75:10)
[eslint]     at withResolver (/home/user/project/node_modules/eslint-module-utils/resolve.js:114:23)
[eslint]     at fullResolve (/home/user/project/node_modules/eslint-module-utils/resolve.js:135:22)
[eslint]     at relative 

Describe the solution you'd like

Add these types to the rest of the exported types (found at @nuxt/content/dist/types.d.ts)

@cco3 cco3 added the enhancement New feature or request label Sep 28, 2023
@cco3 cco3 changed the title Export types Export ParsedContent types Sep 28, 2023
@Barbapapazes Barbapapazes mentioned this issue Nov 10, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant