Skip to content

Adding preview options to the config triggers warnings for svg filesΒ #3494

@kwiat1990

Description

@kwiat1990

Environment

  • Operating System: Darwin
  • Node Version: v22.14.0
  • Nuxt Version: 4.0.2
  • CLI Version: 3.27.0
  • Nitro Version: 2.12.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, devtools, future, pages, compatibilityDate, content, svgo
  • Runtime Modules: @nuxt/[email protected], [email protected]
  • Build Modules: -

Version

v3

Reproduction

https://github.com/kwiat1990/nuxt-content-bug

Description

Hi, recently I started getting warnings like languageId not found for /<path-to-project>/app/assets/svg/icons/arrow-wide.svg in process console (while running unit tests or nuxt dev server) for each SVG file in my project, which is being processed by nuxt-svgo plugin. I can't say if SVG not being process by the svgo are also logged as warning.

After looking at it with the author of the plugin, we come to the conclusion that it must be something on nuxt-content side (please see: cpsoinos/nuxt-svgo#436). Interesting is the fact that the issue seems to be related with the preview.dev option, which one can specify in nuxt.config.ts and props out only if it's defined. To test that behavior please remove comment in the mentioned files from the linked repository and see node console.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions