Skip to content

Autosave oxcfmt only works with .oxfmtrc.jsonc file and not vite.config.ts #959

Closed as duplicate

Description

@dev-tapp

Describe the bug

When I'm setting the oxcfmt settings in my IDE as per the documentation
https://viteplus.dev/guide/fmt#configuration

So pointing it to vite.config.ts and not the .oxfmtrc.json file. I'm seeing the following output

WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [path]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config

Resulting in the formatter not using the settings provided in vite.configt.ts. When I use a .oxfmtrc.jsonc file instead, and configure my IDE to use that file instead, format on save does work.

I'm currently using Vite+ 0.1.12

Reproduction

https://

Steps to reproduce

No response

System Info

VITE+ - The Unified Toolchain for the Web

Environment:
  Version  24.14.0
  Source   lts

Tool Paths:
  node  /Users/xx/.vite-plus/js_runtime/node/24.14.0/bin/node
  npm   /Users/xx/.vite-plus/js_runtime/node/24.14.0/bin/npm
  npx   /Users/xx/.vite-plus/js_runtime/node/24.14.0/bin/npx


Local vite-plus:
  vite-plus  v0.1.12

Tools:
  vite             v8.0.0
  rolldown         v1.0.0-rc.9
  vitest           v4.1.0
  oxfmt            v0.40.0
  oxlint           v1.55.0
  oxlint-tsgolint  v0.17.0
  tsdown           v0.21.3

Used Package Manager

npm

Logs

Validations

Activity

  1. added theissue type on Mar 16, 2026
  2. leaysgur commented on Mar 16, 2026

    @leaysgur
    Contributor

    Thank you for the report.
    Please use this for tracking purposes going forward.

    #930

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

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Target date

    None yet

    Start date

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions