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

defineNuxtConfig vite server prop type error #14917

Closed
baronkoko opened this issue Sep 15, 2022 · 2 comments
Closed

defineNuxtConfig vite server prop type error #14917

baronkoko opened this issue Sep 15, 2022 · 2 comments

Comments

@baronkoko
Copy link

baronkoko commented Sep 15, 2022

Environment

  • Operating System: Darwin
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.10
  • Nitro Version: 0.5.3
  • Package Manager: unknown
  • Builder: vite
  • User Config: alias, css, runtimeConfig, build, modules, vite, typescript
  • Runtime Modules: @pinia/nuxt@0.4.1
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-ea65tz?file=nuxt.config.ts&theme=light

Describe the bug

A type error occurs on the defineNuxtConfig vite server prop
image
In the IDE:
image
Can anyone help with this?

Additional context

No response

Logs

No response

Copy link
Member

This is intentional, as configuring this option is the source of many bugs (and unintended consequences, as this is configuration for the vite dev server only, and not the Nuxt dev server, or the Nuxt build server).

If your use case is proxy, then follow unjs/nitro#113 for easy configuration, but you can also create your own proxy within ~/server.

@baronkoko
Copy link
Author

@danielroe thanks, I'll look into the proxy

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
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

2 participants