-
+
ChatGPT-web
diff --git a/src/lib/NewChat.svelte b/src/lib/NewChat.svelte
index 29d5764..b4b7910 100644
--- a/src/lib/NewChat.svelte
+++ b/src/lib/NewChat.svelte
@@ -1,8 +1,8 @@
diff --git a/src/main.ts b/src/main.ts
index 1ef5cbc..46f54dd 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,8 +1,8 @@
-import "./app.scss";
-import App from "./App.svelte";
+import './app.scss'
+import App from './App.svelte'
const app = new App({
- target: document.getElementById("app"),
-});
+ target: document.getElementById('app') as HTMLElement
+})
-export default app;
+export default app
diff --git a/src/routes.ts b/src/routes.ts
index 4e9dcbe..7aec907 100644
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -1,12 +1,12 @@
-import Home from "./lib/Home.svelte";
-import Chat from "./lib/Chat.svelte";
-import NewChat from "./lib/NewChat.svelte";
+import Home from './lib/Home.svelte'
+import Chat from './lib/Chat.svelte'
+import NewChat from './lib/NewChat.svelte'
export default {
- '/': Home,
+ '/': Home,
- '/chat/new': NewChat,
- '/chat/:chatId': Chat,
+ '/chat/new': NewChat,
+ '/chat/:chatId': Chat,
- '*': Home,
-};
\ No newline at end of file
+ '*': Home
+}
diff --git a/svelte.config.js b/svelte.config.js
index b0683fd..1a90ad4 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -3,5 +3,5 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
- preprocess: vitePreprocess(),
+ preprocess: vitePreprocess()
}
diff --git a/tsconfig.json b/tsconfig.json
index c4e1c5f..d029c43 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -5,6 +5,7 @@
"useDefineForClassFields": true,
"module": "ESNext",
"resolveJsonModule": true,
+ "strictNullChecks": true,
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable checkJs if you'd like to use dynamic types in JS.
@@ -15,6 +16,6 @@
"checkJs": true,
"isolatedModules": true
},
- "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
+ "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte", "vite.config.ts", "svelte.config.js"],
"references": [{ "path": "./tsconfig.node.json" }]
}
diff --git a/vite.config.ts b/vite.config.ts
index 93fb8bb..3290cdd 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,28 +1,28 @@
-import { defineConfig } from "vite";
-import { svelte } from "@sveltejs/vite-plugin-svelte";
+import { defineConfig } from 'vite'
+import { svelte } from '@sveltejs/vite-plugin-svelte'
-import purgecss from "@fullhuman/postcss-purgecss";
+import purgecss from '@fullhuman/postcss-purgecss'
// https://vitejs.dev/config/
export default defineConfig(({ command, mode, ssrBuild }) => {
// Only run PurgeCSS in production builds
- if (command === "build") {
+ if (command === 'build') {
return {
plugins: [svelte()],
css: {
postcss: {
plugins: [
purgecss({
- content: ["./**/*.html", "./**/*.svelte"],
- safelist: ["pre", "code"],
- }),
- ],
- },
- },
- };
+ content: ['./**/*.html', './**/*.svelte'],
+ safelist: ['pre', 'code']
+ })
+ ]
+ }
+ }
+ }
} else {
return {
- plugins: [svelte()],
- };
+ plugins: [svelte()]
+ }
}
-});
+})