Version 0.16.3 works well, but latest version give an error.
failed to load config from /home/projects/github-mgbdfs/vite.config.ts
error when starting dev server:
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/projects/github-mgbdfs/node_modules/.pnpm/unplugin-icons@0.16.4/node_modules/unplugin-icons/dist/vite.js from /home/projects/github-mgbdfs/vite.config.ts not supported.
Instead change the require of vite.js in /home/projects/github-mgbdfs/vite.config.ts to a dynamic import() which is available in all CommonJS modules.
at InternalError.get (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:385021)
at Module._extensions..js (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:259510)
at _require.] (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64579:17)
at Module.load (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:257700)
at Module._load (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:255119)
at Module.require (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:258018)
at i (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:514801)
at _0x216930 (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:42:144147)
at Object.eval (/home/projects/github-mgbdfs/vite.config.ts:38:28)
at Object.function (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:42:144956)
at Module._compile (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:259006)
at _require.] (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64576:24)
at Module.load (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:257700)
at Module._load (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:255119)
at Module.require (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:258018)
at i (https://githubmgbdfs-equ4.w-credentialless.staticblitz.com/blitz.e809191e.js:35:514801)
at loadConfigFromBundledFile (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64584:21)
at async loadConfigFromFile (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64440:28)
at async resolveConfig (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64045:28)
at async _createServer (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63326:20)
at async CAC.eval (/home/projects/github-mgbdfs/node_modules/.pnpm/vite@4.3.9/node_modules/vite/dist/node/cli.js:748:24)
ELIFECYCLE Command failed with exit code 1.
Describe the bug
Version 0.16.3 works well, but latest version give an error.
vite.config.ts
Reproduction
https://stackblitz.com/edit/github-mgbdfs?file=vite.config.ts,tsconfig.json,package.json
System Info
Used Package Manager
pnpm
Validations