summaryrefslogtreecommitdiff
path: root/src/vitePlugin.ts
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-03-21 19:56:37 +0000
committerJoe Carstairs <me@joeac.net>2026-03-21 19:58:25 +0000
commit41974cefad8b23d85f4d6e8ba3156c628d1b159d (patch)
tree8a4a65561f3a488c3ea99691390ad3bacacaad06 /src/vitePlugin.ts
parent360889eda069882ca971bdc4e097751d2b8cad42 (diff)
inlines .gmi
Diffstat (limited to 'src/vitePlugin.ts')
-rw-r--r--src/vitePlugin.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vitePlugin.ts b/src/vitePlugin.ts
index 1568b14..7b5ef44 100644
--- a/src/vitePlugin.ts
+++ b/src/vitePlugin.ts
@@ -2,7 +2,7 @@ import {HTMLRenderer, parse} from "gemtext"
import path from "path"
import {pathToFileURL} from "url"
import type {Plugin} from "vite"
-import {ext, type GemtextConfig} from "./index.js"
+import {type GemtextConfig} from "./index.js"
function transform(code: string, id: string, config: GemtextConfig) {
const result = parse(code)
@@ -54,7 +54,7 @@ export default function gemtextVitePlugin(config: GemtextConfig): Plugin {
name: "astro-gemtext",
enforce: "pre",
transform(code, id) {
- if (!id.endsWith(`.${ext}`)) return
+ if (!id.endsWith('.gmi')) return
return {
code: transform(code, id, config),
map: null,