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

Add import meta for static rendering #25566

Closed
2 of 4 tasks
Barbapapazes opened this issue Feb 1, 2024 · 5 comments
Closed
2 of 4 tasks

Add import meta for static rendering #25566

Barbapapazes opened this issue Feb 1, 2024 · 5 comments

Comments

@Barbapapazes
Copy link
Contributor

Barbapapazes commented Feb 1, 2024

Describe the feature

Hello,

Actually, there is different import meta. One of them is for prerendering. But there is nothing about static when nuxt is generating the website. Pre-render key is not enough specific when site is static since there is a payload generated.

See nuxt/content#2533

https://nuxt.com/docs/api/advanced/import-meta#runtime-app-properties

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@pi0
Copy link
Member

pi0 commented Feb 1, 2024

Modules can use nuxt.options.static flag to change their behavior for full-static builds.

@Barbapapazes
Copy link
Contributor Author

And is this usable in a composable? (not in a module.ts file).

@danielroe
Copy link
Member

The nuxt options are only usable in nuxt/module context but modules can expose whatever they need at runtime.

@danielroe
Copy link
Member

What would your use case be for this?

@danielroe
Copy link
Member

Closing as I think this is already implemented. Feel free to add more info later and we can reopen 🙏

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants