Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
Description
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.1Used Package Manager
npm
Logs
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
None yet
Effort
None yet
Target date
None yet
Start date
None yet
Activity
leaysgur commentedon Apr 6, 2026
NOTE:
vp checkfindsvite.config.mjs(not.ts)vp checkcallsoxfmtandoxlintwith-c vite.config.mjsoxlintandoxfmtonly treat.tsas vite.configleaysgur commentedon Apr 6, 2026
@fengmk2 Let me confirm... (if you know it,)
In Vite+, vite.config
.tsis the only config file extension? Or does it support all file extensions supported by Vite?shyim commentedon Apr 6, 2026
Can confirm renaming it to
vite.config.tsfixes itfengmk2 commentedon Apr 6, 2026
@leaysgur Vite+ currently matches the config file name supported by Vite https://github.com/voidzero-dev/vite-plus/blob/main/crates/vite_static_config/README.md#config-file-resolution
leaysgur commentedon Apr 6, 2026
Thanks, let's track in #930 too.