solidjs / solid-start

SolidStart, the Solid app framework
https://start.solidjs.com
MIT License
4.93k stars 371 forks source link

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

Closed drumm2k closed 1 month ago

drumm2k commented 1 month ago

Duplicates

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 commented 1 month ago

found duplicate, so closing this issue