From dc758b05218ad7361e05d1ff5e3c1b7c1d5dd90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Thu, 18 Feb 2021 16:26:59 +0800 Subject: [PATCH] ix: rollup-plugin-esbuild tsconfig.json check --- README.md | 14 ++++++++++++++ tsconfig.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1336212..6a206e0 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,20 @@ ], ``` - "rollup-plugin-esbuild": "^2.4.2", 有 BUG `21-02-18` +- **tsconfig.json中不能有多余的逗号,不然有如下警告** `21-02-18` + ```bash + SyntaxError: Unexpected token ] in JSON at position 428 + at JSON.parse () + at Object.load (/Users/caoxie/Desktop/github/electron-vue-vite2/node_modules/rollup-plugin-esbuild/dist/index.js:21:17) { + code: 'PLUGIN_ERROR', + plugin: 'esbuild', + hook: 'transform', + id: '/Users/caoxie/Desktop/github/electron-vue-vite2/src/main/index.ts', + watchFiles: [ + '/Users/caoxie/Desktop/github/electron-vue-vite2/src/main/index.ts' + ] + } + ``` ## 总结 diff --git a/tsconfig.json b/tsconfig.json index 3a41ab3..17dbf9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "strict": true, "paths": { "@/*": ["src/render/*"], - "@root/*": ["./*"], + "@root/*": ["./*"] }, "allowSyntheticDefaultImports": true },