From bf2611a1be30aa9f0bd9774e194cc0e176f6cbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=83=BC=E3=81=9A=28=EF=BD=A58=EF=BD=A5=29?= =?UTF-8?q?=E3=81=91=E3=83=BC=E3=81=8D?= <31585494+MineCake147E@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:09:53 +0900 Subject: [PATCH 1/2] Updated `vite.config.js` so that it matches the `tsconfig.json` --- playground/vite.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playground/vite.config.js b/playground/vite.config.js index 4025d882..5fcc624e 100644 --- a/playground/vite.config.js +++ b/playground/vite.config.js @@ -10,4 +10,7 @@ export default defineConfig({ allow: [ '..' ] } }, + build: { + target: "es2022" + }, }) From 8af4d1513200820eea259e11a5cf79e5346b53b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=83=BC=E3=81=9A=28=EF=BD=A58=EF=BD=A5=29?= =?UTF-8?q?=E3=81=91=E3=83=BC=E3=81=8D?= <31585494+MineCake147E@users.noreply.github.com> Date: Tue, 28 Nov 2023 12:37:21 +0900 Subject: [PATCH 2/2] Let `vite.config.js` sync with `tsconfig.json` --- playground/vite.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playground/vite.config.js b/playground/vite.config.js index 5fcc624e..b6b3841f 100644 --- a/playground/vite.config.js +++ b/playground/vite.config.js @@ -1,5 +1,10 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +import { readFileSync } from 'fs'; + +const data = JSON.parse(readFileSync('../tsconfig.json', 'utf8')); + +let target = data.compilerOptions.target; // https://vitejs.dev/config/ export default defineConfig({ @@ -11,6 +16,6 @@ export default defineConfig({ } }, build: { - target: "es2022" + target: target }, })