solidjs / solid-start

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

[Bug?]: Extend Solid config causes TS Errors #1464

Closed ryoid closed 1 month ago

ryoid commented 2 months ago

Duplicates

Latest version

Current behavior 😯

Extending solid config has required fields that should be optional.

// app.config.ts
export default defineConfig({
  solid: {
    // Uncomment to supress errors
    // dev: true,
    // ssr: false,
    // hot: true,
    // solid: {
    //   omitNestedClosingTags: false,
    // },
    babel: {
      env: {
        development: {
          // https://github.com/nksaraf/vinxi/issues/204
          compact: true,
        },
      },
    },
  },
});

Expected behavior πŸ€”

Should not error since these fields have default values. Looking at vite-plugin-solid it seems like these are optional there.

Steps to reproduce πŸ•Ή

https://stackblitz.com/edit/github-e58cde-3el8ng?file=package.json

Steps:

  1. Extend the Solid config in app.config.ts with some babel settings
  2. Observe typescript errors

Context πŸ”¦

Encountered when trying to use config from https://github.com/nksaraf/vinxi/issues/204#issuecomment-2053760779

Your environment 🌎

No response

ryansolid commented 1 month ago

Yeah we fixed this in 2.10.x of Vite Plugin Solid but Start hasn't been updated to it. Thanks for pointing this out.

ryansolid commented 1 month ago

This has been fixed in https://github.com/solidjs/solid-start/commit/7ae0541097f95fd9e1b7368368794c5cac71ffe8