这是我为一个没有创建-反应应用程序而构建的app项目的tsconfig。
{
"compilerOptions": {
"target": "es5",
"outDir": "lib",
"lib": ["dom", "dom.iterable", "esnext"],
"declaration": true,
"declarationDir": "lib",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"exclude": ["node_modules", "lib"],
"references": [{ "path": "./tsconfig.vite.json" }]
}在运行命令vite时,我得到了以上错误,该命令应该是用来旋转一个dev服务器的
发布于 2022-08-08 11:52:30
解决方案是将es5更新为ES2015。
{
...
"target":"ES2015",
...
}https://stackoverflow.com/questions/73277461
复制相似问题