cli
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
node版本问题
因为 node.js V17版本中发布的OpenSSL3.0, 而OpenSSL3.0对允许算法和密钥大小增加了严格的限制,可能会对生态系统造成一些影响。故此以前的项目在升级 nodejs 版本后会报错。
node版本 v17以下设置
"scripts": {
"serve": "vue-cli-service serve --open",
"build": "vue-cli-service build"
},
node版本是v17及以上需要设置兼容
"scripts": {
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --open",
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
},
Customize configuration
See Configuration Reference.