solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: Vite field in the app config has wrong types

Open drumm2k opened this issue 1 year ago • 0 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

vite field in config has any type

The reason is wrong import path in node_modules/@solidjs/start/config/index.d.ts

Cannot find module 'vinxi/dist/types/lib/vite-dev' or its corresponding type declarations.

import type { CustomizableConfig } from "vinxi/dist/types/lib/vite-dev";

type ViteCustomizableConfig = CustomizableConfig & {
  server?: InlineConfig["server"];
}

Tried to fix this issue by myself, but vinxi doesn't export CustomizableConfig in any obvious way

Expected behavior 🤔

Vite field has right typings in the config

Steps to reproduce 🕹

Steps:

  1. Add vite field to defineConfig in app.config.ts
  2. Check its type

Context 🔦

Would love to have good DX when vite options in config are typed

Your environment 🌎

Package manager: pnpm (9.1.2)
Editor: vscode (latest stable)

Installed packages:
"@solidjs/start": "^1.0.0",
"vinxi": "^0.3.11"

drumm2k avatar May 25 '24 19:05 drumm2k