Skip to content

Commit

Permalink
chore(ecmascript): switch to ES2024
Browse files Browse the repository at this point in the history
  • Loading branch information
ferferga authored Nov 25, 2024
1 parent 1bc5a5c commit b85a540
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Top-level await requires ES2022 (at least) as target and module
* for TypeScript compiler (check tsconfig.json)
* https://caniuse.com/mdn-javascript_operators_await_top_level
* These features are used across the codebase and requires specific
* ECMAScript versions as target in TypeScript compiler (check tsconfig.json):
* - Top-level: ES2022 https://caniuse.com/mdn-javascript_operators_await_top_level
* - Object.groupBy: ES2024 https://caniuse.com/mdn-javascript_builtins_object_groupby
*/
import { createApp } from 'vue';
import { routes } from 'vue-router/auto-routes';
Expand Down
2 changes: 1 addition & 1 deletion frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineConfig({
/**
* See main.ts for an explanation of this target
*/
target: 'esnext',
target: 'es2024',
/**
* Disable chunk size warnings
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/configs/typescript/base.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ESNext",
"target": "ES2024",
"module": "Preserve",
"moduleResolution": "Bundler",
"esModuleInterop": true,
Expand Down

0 comments on commit b85a540

Please sign in to comment.