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 types to config #102

Open
mvsde opened this issue Feb 28, 2021 · 0 comments
Open

Add types to config #102

mvsde opened this issue Feb 28, 2021 · 0 comments
Assignees

Comments

@mvsde
Copy link
Member

mvsde commented Feb 28, 2021

There is a fantastic example by Anthony Fu for typed configs that work both in JS and TS:

// vite.config.js
import { defineConfig } from 'vite'

export default defineConfig({
  /* ... */
})

The defineConfig function acts as pass through that adds types along the way.

@mvsde mvsde self-assigned this Feb 28, 2021
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

1 participant