Vue3 使用 Vite配置JSX/TSX支持
开始搭建项目
详情请按Vite官方文档
各位客官们,注意一下搭建项目之前,请使用npm --version
检查一下自己的npm版本,按照文档的不同npm版本对应的不同命令行,对号入座~
如果有使用MacOS的同学,可能会遇到一下子问题:
throw new Error(`esbuild: Failed to install correctly
^
Error: esbuild: Failed to install correctly
Make sure you don't have "ignore-scripts" set to true. You can check this with
"npm config get ignore-scripts". If that returns true you can reset it back to
false using "npm config set ignore-scripts false" and then reinstall esbuild.
If you're using npm v7, make sure your package-lock.json file contains either
"lockfileVersion": 1 or the code "hasInstallScript": true. If it doesn't have
either of those, then it is likely the case that a known bug in npm v7 has
corrupted your package-lock.json file. Regenerating your package-lock.json file
should fix this issue.
at Object.<anonymous> (/Users/chenwenbin/Nutstore Files/TempWorkSpace/first-vue3/node_modules/esbuild/bin/esbuild:2:7)
at Module