Skip to content

Unable to use import.meta in the sample code #223

@ubugeeei

Description

@ubugeeei

Unable to use import.meta in content templates.

When displayed in the Playground, the expanded values are displayed in code.

It can be tricky when we want to create content like “Use import.meta.server if you only want to run something on the server side”

https://nuxt.com/docs/api/advanced/import-meta


Local content/**/.template/* files:

Image

Playground:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions