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

import type assertion when defining custom transformers #1823

Closed
SheetJSDev opened this issue Jan 14, 2023 · 1 comment
Closed

import type assertion when defining custom transformers #1823

SheetJSDev opened this issue Jan 14, 2023 · 1 comment

Comments

@SheetJSDev
Copy link
Contributor

Environment

  • Operating System: Darwin
  • Node Version: v18.13.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: unknown
  • Builder: vite
  • User Config: modules, content
  • Runtime Modules: normalizedModule(), @nuxt/content@2.3.0
  • Build Modules: -

Reproduction

https://github.com/nuxt/content/tree/main/examples/advanced/transformer (literally the demo in the source tree)

Describe the bug

 ERROR  [worker reload] [worker init] Module "file:///path/to/nuxt/content/examples/advanced/transformer/node_modules/@nuxt/content/dist/runtime/transformers/shiki/languages/mdc.tmLanguage.json" needs an import assertion of type "json"

Additional context

No response

Logs

No response

@SheetJSDev
Copy link
Contributor Author

This was fixed by #1824 . Until the next version is published (current is v2.3.0), the workaround is:

import { defineTransformer } from '@nuxt/content/transformers/utils'

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

1 participant