Skip to content

Commit 94347fc

Browse files
committed
fix(build): change vite build target to es2020
1 parent 127f0a5 commit 94347fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vite.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export default defineConfig((configEnv) => {
4040
],
4141

4242
build: {
43-
target: "es2015",
43+
// Official @vue/tsconfig compiles down to ES2020, let's do the same.
44+
// See: https://github.com/vuejs/tsconfig/blob/main/tsconfig.dom.json
45+
target: "es2020",
4446
lib: {
4547
name: "vue3-select-component",
4648
entry: resolve("./src/index.ts"),
@@ -59,7 +61,7 @@ export default defineConfig((configEnv) => {
5961
config.plugins!.push(vueDevtools());
6062
}
6163

62-
if (configEnv.mode.includes("playground")) {
64+
if (configEnv.mode === "development:playground") {
6365
config.root = resolve("./playground");
6466
}
6567

0 commit comments

Comments
 (0)