From 32d69501b0586fbafeedd4b33c2da4f197e7b554 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 26 Feb 2022 00:23:33 +0000 Subject: [PATCH] Add nightink; esbuild: mark html as text This way we can do an es6 import to get a html file as a string, which we can then pass to nightink for templating - all on the client-side! Note to self: Instead of using .innerHTML directly, we might want to try doing document.createElement(), then .innerHTML, and then .appendChild where we actually want it to go --- package-lock.json | 1 + package.json | 1 + src/static/esbuild.mjs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81950f3..369e570 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "applause-cli": "^1.8.0", "jpake": "^1.0.1", "mime": "^3.0.0", + "nightink": "^0.1.3", "p-queue": "^7.2.0", "p-reflect": "^3.0.0", "p-retry": "^5.0.0", diff --git a/package.json b/package.json index 6a8dc6b..bbb884d 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "applause-cli": "^1.8.0", "jpake": "^1.0.1", "mime": "^3.0.0", + "nightink": "^0.1.3", "p-queue": "^7.2.0", "p-reflect": "^3.0.0", "p-retry": "^5.0.0", diff --git a/src/static/esbuild.mjs b/src/static/esbuild.mjs index 189194e..326a3fb 100755 --- a/src/static/esbuild.mjs +++ b/src/static/esbuild.mjs @@ -44,12 +44,12 @@ function hash_file(hashName, path) { minify: true, sourcemap: true, loader: { - ".html": "file", + ".html": "text", ".svg": "file", ".woff2": "file", ".woff": "file", ".eot": "file", - ".ttf": "file" + ".ttf": "file", } }); if(result.errors.length > 0 || result.warnings.length > 0)