使用@vitejs/plugin-legacy报错Cannot destructure property 'renderBuiltUrl' of 'config.experimental' as it is undefined
在安装了@vitejs/plugin-legacy
版本2.x后,运行npm run build进行打包,报错:
Cannot destructure property 'renderBuiltUrl' of 'config.experimental' as it is undefined
原因:plugin-legacy版本为2.x后,vite版本需要为3.x版本
"devDependencies": {
"@vitejs/plugin-legacy": "^2.1.0",
"vite": "^3.1.0",
...
}