summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/basics/tsconfig.json12
-rw-r--r--examples/blog-multiple-authors/tsconfig.json12
-rw-r--r--examples/blog/tsconfig.json12
-rw-r--r--examples/docs/tsconfig.json17
-rw-r--r--examples/env-vars/tsconfig.json11
-rw-r--r--examples/framework-alpine/tsconfig.json12
-rw-r--r--examples/framework-lit/tsconfig.json12
-rw-r--r--examples/framework-multiple/tsconfig.json12
-rw-r--r--examples/framework-preact/tsconfig.json15
-rw-r--r--examples/framework-react/package.json2
-rw-r--r--examples/framework-react/tsconfig.json12
-rw-r--r--examples/framework-solid/tsconfig.json15
-rw-r--r--examples/framework-svelte/tsconfig.json12
-rw-r--r--examples/framework-vue/tsconfig.json12
-rw-r--r--examples/integrations-playground/tsconfig.json12
-rw-r--r--examples/minimal/tsconfig.json12
-rw-r--r--examples/non-html-pages/tsconfig.json12
-rw-r--r--examples/portfolio/tsconfig.json12
-rw-r--r--examples/ssr/tsconfig.json12
-rw-r--r--examples/starter/tsconfig.json12
-rw-r--r--examples/subpath/tsconfig.json12
-rw-r--r--examples/with-markdown-plugins/tsconfig.json12
-rw-r--r--examples/with-markdown-shiki/tsconfig.json12
-rw-r--r--examples/with-markdown/tsconfig.json12
-rw-r--r--examples/with-nanostores/tsconfig.json12
-rw-r--r--examples/with-tailwindcss/tsconfig.json12
-rw-r--r--examples/with-vite-plugin-pwa/tsconfig.json14
27 files changed, 294 insertions, 32 deletions
diff --git a/examples/basics/tsconfig.json b/examples/basics/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/basics/tsconfig.json
+++ b/examples/basics/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/blog-multiple-authors/tsconfig.json b/examples/blog-multiple-authors/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/blog-multiple-authors/tsconfig.json
+++ b/examples/blog-multiple-authors/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/blog/tsconfig.json b/examples/blog/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/blog/tsconfig.json
+++ b/examples/blog/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/docs/tsconfig.json b/examples/docs/tsconfig.json
index cb92ff9ff..7ac81809a 100644
--- a/examples/docs/tsconfig.json
+++ b/examples/docs/tsconfig.json
@@ -1,8 +1,15 @@
{
"compilerOptions": {
- "target": "es2020",
- "module": "esnext",
- "jsx": "preserve"
- },
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
+ }
}
diff --git a/examples/env-vars/tsconfig.json b/examples/env-vars/tsconfig.json
index c9d2331c8..7ac81809a 100644
--- a/examples/env-vars/tsconfig.json
+++ b/examples/env-vars/tsconfig.json
@@ -1,6 +1,15 @@
{
"compilerOptions": {
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
"moduleResolution": "node",
- "module": "ES2020"
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-alpine/tsconfig.json b/examples/framework-alpine/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-alpine/tsconfig.json
+++ b/examples/framework-alpine/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-lit/tsconfig.json b/examples/framework-lit/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-lit/tsconfig.json
+++ b/examples/framework-lit/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-multiple/tsconfig.json b/examples/framework-multiple/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-multiple/tsconfig.json
+++ b/examples/framework-multiple/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-preact/tsconfig.json b/examples/framework-preact/tsconfig.json
index 8e881cf9c..8c4c4bb42 100644
--- a/examples/framework-preact/tsconfig.json
+++ b/examples/framework-preact/tsconfig.json
@@ -1,5 +1,18 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Preact specific settings
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index e767740f1..8d618e645 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -13,6 +13,8 @@
"astro": "^1.0.0-beta.19"
},
"dependencies": {
+ "@types/react": "^18.0.0",
+ "@types/react-dom": "^18.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
}
diff --git a/examples/framework-react/tsconfig.json b/examples/framework-react/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-react/tsconfig.json
+++ b/examples/framework-react/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-solid/tsconfig.json b/examples/framework-solid/tsconfig.json
index 8e881cf9c..3aae33ef4 100644
--- a/examples/framework-solid/tsconfig.json
+++ b/examples/framework-solid/tsconfig.json
@@ -1,5 +1,18 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Solid specific settings
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js",
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-svelte/tsconfig.json b/examples/framework-svelte/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-svelte/tsconfig.json
+++ b/examples/framework-svelte/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/framework-vue/tsconfig.json b/examples/framework-vue/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/framework-vue/tsconfig.json
+++ b/examples/framework-vue/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/integrations-playground/tsconfig.json b/examples/integrations-playground/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/integrations-playground/tsconfig.json
+++ b/examples/integrations-playground/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/minimal/tsconfig.json b/examples/minimal/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/minimal/tsconfig.json
+++ b/examples/minimal/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/non-html-pages/tsconfig.json b/examples/non-html-pages/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/non-html-pages/tsconfig.json
+++ b/examples/non-html-pages/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/portfolio/tsconfig.json b/examples/portfolio/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/portfolio/tsconfig.json
+++ b/examples/portfolio/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/ssr/tsconfig.json b/examples/ssr/tsconfig.json
index ee0432bb3..7ac81809a 100644
--- a/examples/ssr/tsconfig.json
+++ b/examples/ssr/tsconfig.json
@@ -1,9 +1,15 @@
{
"compilerOptions": {
- "lib": ["ES2015", "DOM"],
- "module": "ES2022",
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
"moduleResolution": "node",
+ // Enable JSON imports.
"resolveJsonModule": true,
- "types": ["astro/env"]
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/starter/tsconfig.json b/examples/starter/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/starter/tsconfig.json
+++ b/examples/starter/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/subpath/tsconfig.json b/examples/subpath/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/subpath/tsconfig.json
+++ b/examples/subpath/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-markdown-plugins/tsconfig.json b/examples/with-markdown-plugins/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/with-markdown-plugins/tsconfig.json
+++ b/examples/with-markdown-plugins/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-markdown-shiki/tsconfig.json b/examples/with-markdown-shiki/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/with-markdown-shiki/tsconfig.json
+++ b/examples/with-markdown-shiki/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-markdown/tsconfig.json b/examples/with-markdown/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/with-markdown/tsconfig.json
+++ b/examples/with-markdown/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-nanostores/tsconfig.json b/examples/with-nanostores/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/with-nanostores/tsconfig.json
+++ b/examples/with-nanostores/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-tailwindcss/tsconfig.json b/examples/with-tailwindcss/tsconfig.json
index 8e881cf9c..7ac81809a 100644
--- a/examples/with-tailwindcss/tsconfig.json
+++ b/examples/with-tailwindcss/tsconfig.json
@@ -1,5 +1,15 @@
{
"compilerOptions": {
- "moduleResolution": "node"
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
}
}
diff --git a/examples/with-vite-plugin-pwa/tsconfig.json b/examples/with-vite-plugin-pwa/tsconfig.json
index 5d9f97afe..7ac81809a 100644
--- a/examples/with-vite-plugin-pwa/tsconfig.json
+++ b/examples/with-vite-plugin-pwa/tsconfig.json
@@ -1,3 +1,15 @@
{
- "include": ["src/**/*.ts"]
+ "compilerOptions": {
+ // Enable top-level await, and other modern ESM features.
+ "target": "ESNext",
+ "module": "ESNext",
+ // Enable node-style module resolution, for things like npm package imports.
+ "moduleResolution": "node",
+ // Enable JSON imports.
+ "resolveJsonModule": true,
+ // Enable stricter transpilation for better output.
+ "isolatedModules": true,
+ // Add type definitions for our Vite runtime.
+ "types": ["vite/client"]
+ }
}