Skip to content

Commit

Permalink
chore: fix top level await
Browse files Browse the repository at this point in the history
  • Loading branch information
anubra266 committed Dec 24, 2024
1 parent 2e21881 commit cb24311
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 21 deletions.
18 changes: 11 additions & 7 deletions site/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"target": "esnext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"module": "esnext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src"]
}
"include": [
"src"
]
}
12 changes: 8 additions & 4 deletions site/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
],
}
18 changes: 11 additions & 7 deletions site/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"target": "esnext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"module": "esnext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}
"include": [
"vite.config.ts"
]
}
11 changes: 8 additions & 3 deletions site/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})
esbuild: {
supported: {
"top-level-await": true, //browsers can handle top-level-await features
},
},
});

0 comments on commit cb24311

Please sign in to comment.