Skip to content

Config file with defineConfig() for gpjsui package #2

Description

@tom96da

`gpjsui package` currently reads app metadata (productName, identifier,
icon) from package.json's own fields plus a "gpjsui" key — plain JSON,
no code. Want a proper `gpjsui.config.mts` with a `defineConfig()` helper
instead, the way Vite/Vitest do it, once there's more than a handful of
config fields.

Blocked on: `@gpjs-ui/cli` doesn't depend on `vite` directly (only
`@gpjs-ui/vite` does), and Node 20 — still in the CI test matrix — can't
load `.mts` natively. Evaluating a config file needs either borrowing
Vite's own config loader or extending the Bundler contract to carry
config loading too.

Out of scope

  • Changing how dev/build/package read metadata today — package.json's
    "gpjsui" key stays until this lands

Tasks

  • Decide how a `.mts` config gets evaluated without adding a second
    vite dependency or a second config-loading mechanism
  • `defineConfig()` helper with real types for the metadata gpjsui
    package already reads
  • `gpjsui.config.mts` wins over package.json's "gpjsui" key when both exist

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions