feat-修复vite3小程序运行报错,更新部分依赖

This commit is contained in:
Huang 2022-07-28 11:18:16 +08:00
parent 571f243092
commit fde4a4dfbe
3 changed files with 391 additions and 347 deletions

View File

@ -35,47 +35,48 @@
"prepare": "husky install" "prepare": "husky install"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-app": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-app-plus": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-app-plus": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-components": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-components": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-h5": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-h5": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-i18n": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-i18n": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-alipay": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-alipay": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-baidu": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-baidu": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-kuaishou": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-kuaishou": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-lark": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-lark": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-qq": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-qq": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-toutiao": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-toutiao": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-mp-weixin": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-mp-weixin": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-quickapp-webview": "^3.0.0-alpha-3050320220727002",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"pinia": "^2.0.16", "pinia": "^2.0.17",
"vue": "^3.2.37", "vue": "^3.2.37",
"vue-i18n": "^9.1.10" "vue-i18n": "^9.1.10"
}, },
"devDependencies": { "devDependencies": {
"@dcloudio/types": "^2.6.12", "@dcloudio/types": "^2.6.12",
"@dcloudio/uni-automator": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-automator": "^3.0.0-alpha-3050320220727002",
"@dcloudio/uni-cli-shared": "^3.0.0-alpha-3050220220719003", "@dcloudio/uni-cli-shared": "^3.0.0-alpha-3050320220727002",
"@dcloudio/vite-plugin-uni": "^3.0.0-alpha-3050220220719003", "@dcloudio/vite-plugin-uni": "^3.0.0-alpha-3050320220727002",
"@types/crypto-js": "^4.1.1", "@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.6", "@types/lodash-es": "^4.17.6",
"@types/node": "^17.0.45", "@types/node": "^17.0.45",
"@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.30.6", "@typescript-eslint/parser": "^5.31.0",
"eslint": "^8.19.0", "eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.2.0", "eslint-plugin-vue": "^9.3.0",
"husky": "^8.0.1", "husky": "^8.0.1",
"lint-staged": "^13.0.3", "lint-staged": "^13.0.3",
"mrm": "^4.0.0", "mrm": "^4.0.0",
"postcss": "^8.4.14", "postcss": "^8.4.14",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"sass": "^1.53.0", "sass": "^1.54.0",
"terser": "^5.14.2",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"vite": "^3.0.2", "vite": "^3.0.3",
"vite-plugin-eslint": "^1.7.0" "vite-plugin-eslint": "^1.7.0"
}, },
"husky": { "husky": {

686
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ import eslintPlugin from 'vite-plugin-eslint';
import { resolve } from 'path'; import { resolve } from 'path';
import { loadEnv } from 'vite'; import { loadEnv } from 'vite';
// https://vitejs.dev/config/ // https://vitejs.cn/config/
export default ({ mode }: ConfigEnv): UserConfig => { export default ({ mode }: ConfigEnv): UserConfig => {
const root = process.cwd(); const root = process.cwd();
const env = loadEnv(mode, root); const env = loadEnv(mode, root);
@ -15,6 +15,9 @@ export default ({ mode }: ConfigEnv): UserConfig => {
'@': resolve('./src'), '@': resolve('./src'),
}, },
}, },
define: {
'process.env': {},
},
build: { build: {
minify: 'terser', minify: 'terser',
terserOptions: { terserOptions: {