Node 16.14.0, Vite 4.x, Vue 3.3, TypeScript 5.x, Pnpm 8.5.0
Detail:
TypeError: mockServer is not a function
at vite_config_default (file:///D:/WingsCloud/admin/vite.config.ts.timestamp-1685503172637-fed7821a0e9af.mjs:104:7)
at loadConfigFromFile (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64391:15)
at async resolveConfig (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63993:28)
at async _createServer (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63274:20)
at async CAC. (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/cli.js:733:24)
Title:
An error occurred when I used it in vite4.x.
Environment:
Node 16.14.0, Vite 4.x, Vue 3.3, TypeScript 5.x, Pnpm 8.5.0
Detail:
TypeError: mockServer is not a function at vite_config_default (file:///D:/WingsCloud/admin/vite.config.ts.timestamp-1685503172637-fed7821a0e9af.mjs:104:7) at loadConfigFromFile (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64391:15) at async resolveConfig (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63993:28) at async _createServer (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63274:20) at async CAC. (file:///D:/WingsCloud/admin/nodemodules/.pnpm/vite@4.3.9@types+node@18.16.16_sass@1.62.1/node_modules/vite/dist/node/cli.js:733:24)