about summary refs log tree commit diff stats
path: root/build.js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-06-27 00:16:06 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-06-27 00:16:06 +0300
commit67d8785083c159aaaf3a4757e3bd6d8a5e07602e (patch)
tree26c94b4487dc129fc11e7095b1e3e06add7a908b /build.js
parent5fe9fbf8e5388c121964cc2ecaae34d92d12f632 (diff)
downloadthe-epube-67d8785083c159aaaf3a4757e3bd6d8a5e07602e.tar.gz
the-epube-67d8785083c159aaaf3a4757e3bd6d8a5e07602e.tar.xz
even more ts fixes
Diffstat (limited to 'build.js')
-rw-r--r--build.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/build.js b/build.js
index a2eb419..54488cf 100644
--- a/build.js
+++ b/build.js
@@ -42,9 +42,9 @@ const LESS_FILES = [
 ]
 
 const JS_FILES = [
-	'src/http.js',
-	'src/app.js',
-	'src/reader.js'
+	'src/http.ts',
+	'src/app.ts',
+	'src/reader.ts'
 ];
 
 // Files that should be precached by the service worker
@@ -86,7 +86,7 @@ async function buildApp() {
 	console.log(`build version: ${BUILD_VERSION}`);
 
 	await esbuild.build({
-		stdin: { contents: content, resolveDir: process.cwd(), loader: 'js' },
+		stdin: { contents: content, resolveDir: process.cwd(), loader: 'ts' },
 		bundle: false,
 		minify: true,
 		outfile: 'dist/app.min.js',
@@ -113,7 +113,7 @@ async function buildApp() {
 
 	console.log('building service worker...');
 
-	const workerContent = readFileSync("src/worker.js");
+	const workerContent = readFileSync("src/worker.ts");
 
 	// Use suffixed JS filenames in manifest (stripped by worker for cache keys)
 	// worker.js itself is the service worker — not versioned, replaced atomically by deploy
@@ -129,7 +129,7 @@ async function buildApp() {
 	MANIFEST_ASSETS = [...new Set(MANIFEST_ASSETS)];
 
 	await esbuild.build({
-		stdin: { contents: workerContent, resolveDir: process.cwd(), loader: 'js' },
+		stdin: { contents: workerContent, resolveDir: process.cwd(), loader: 'ts' },
 		bundle: false,
 		minify: true,
 		outfile: 'worker.js',