Skip to content

vp check fails JS functions cannot be represented as a serde_json::Value #1300

@shyim

Description

@shyim

Describe the bug

❯ vp check 
VITE+ - The Unified Toolchain for the Web

error: Formatting could not start
Failed to load configuration file.
/Users/shyim/Developer/shopmon/frontend/vite.config.mjs
Error: JS functions cannot be represented as a serde_json::Value
Ensure the file has a valid default export of a JSON-serializable configuration object.

Formatting failed before analysis started

My vite.config.mjs

import { URL, fileURLToPath } from "node:url";

import tailwindcss from "@tailwindcss/vite";
import Vue from "@vitejs/plugin-vue";
import IconsResolver from "unplugin-icons/resolver";
import Icons from "unplugin-icons/vite";
import Components from "unplugin-vue-components/vite";
import { defineConfig } from "vite-plus";

const hmr = {};

if (process.env.HMR_PORT) {
  hmr.clientPort = process.env.HMR_PORT;
}

export default defineConfig({
  fmt: {},
  plugins: [
    tailwindcss(),
    Vue(),
    Components({
      resolvers: [
        IconsResolver({
          prefix: "icon",
        }),
      ],
    }),
    Icons({
      autoInstall: true,
      scale: 1,
    }),
  ],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
    },
  },
  server: {
    hmr,
    proxy: {
      "/api": {
        target: process.env.SHOPMON_API_URL || "https://shopmon.fos.gg",
        changeOrigin: true,
      },
    },
  },
});

When I uncomment all plugins it works.

Reproduction

x

Steps to reproduce

No response

System Info

ITE+ - The Unified Toolchain for the Web

Environment:
  Version  24.14.1
  Source   lts

Tool Paths:
  node  /Users/shyim/.vite-plus/js_runtime/node/24.14.1/bin/node
  npm   /Users/shyim/.vite-plus/js_runtime/node/24.14.1/bin/npm
  npx   /Users/shyim/.vite-plus/js_runtime/node/24.14.1/bin/npx



VITE+ - The Unified Toolchain for the Web

vp v0.1.15

Local vite-plus:
  vite-plus  v0.1.15

Tools:
  vite             v8.0.3
  rolldown         v1.0.0-rc.12
  vitest           v4.1.2
  oxfmt            v0.43.0
  oxlint           v1.58.0
  oxlint-tsgolint  v0.18.1
  tsdown           v0.21.7

Environment:
  Package manager  npm v11.12.1
  Node.js          v24.14.1

Used Package Manager

npm

Logs

Validations

Metadata

Metadata

Assignees

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions