fix vite and solid in dev

Inclusion of @astrojs/markdown-remark caused errors that cause solid
and vite to fail to load in dev. It's stripped in build.
This commit is contained in:
outfoxxed 2024-10-11 22:35:32 -07:00
parent 7f3b6795a6
commit 492200a42b
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 7 additions and 18 deletions

View file

@ -1,5 +1,5 @@
--- ---
import { processQsMarkdown } from "@config/io/helpers" import { processMarkdown } from "@config/io/markdown"
export interface Props { export interface Props {
markdown?: string, markdown?: string,
@ -7,7 +7,7 @@ export interface Props {
const { markdown } = Astro.props; const { markdown } = Astro.props;
const html = markdown ? await processQsMarkdown(markdown) : null; const html = markdown ? await processMarkdown(markdown) : null;
--- ---
<section class="typedata-details"> <section class="typedata-details">
{html ? <div class="typedata-detailsdata" set:html={html} /> : <em>No details provided</em>} {html ? <div class="typedata-detailsdata" set:html={html} /> : <em>No details provided</em>}

View file

@ -1,5 +1,3 @@
import * as markdownUtils from "./markdown.ts";
import { import {
// Flag, // Flag,
PowerCord, PowerCord,
@ -75,12 +73,6 @@ export function groupRoutes(routes: RouteData[]): GroupedRoutes {
}, defaultValue); }, defaultValue);
} }
export async function processQsMarkdown(
markdown: string
): Promise<string> {
return await markdownUtils.processMarkdown(markdown);
}
export function getQMLTypeLinkObject(unparsed: string) { export function getQMLTypeLinkObject(unparsed: string) {
const isLocal = unparsed.startsWith("MQS_") ? "local" : false; const isLocal = unparsed.startsWith("MQS_") ? "local" : false;
const isQT = unparsed.startsWith("MQT_") ? "qt" : false; const isQT = unparsed.startsWith("MQT_") ? "qt" : false;

View file

@ -96,7 +96,6 @@ export const markdownConfig: AstroMarkdownOptions = {
remarkPlugins: [[remarkAlert, { legacyTitle: true }]], remarkPlugins: [[remarkAlert, { legacyTitle: true }]],
rehypePlugins: [ rehypePlugins: [
// FIXME: incompatible types between unified/Plugin and Astro/RehypePlugin // FIXME: incompatible types between unified/Plugin and Astro/RehypePlugin
// @ts-expect-error
[sectionize as RehypePlugin, { idPropertyName: "id" }], [sectionize as RehypePlugin, { idPropertyName: "id" }],
rehypeRewriteTypelinks, rehypeRewriteTypelinks,
], ],

View file

@ -1,8 +1,6 @@
--- ---
import { import { getQMLTypeLink } from "@config/io/helpers";
processQsMarkdown, import { processMarkdown } from "@config/io/markdown";
getQMLTypeLink,
} from "@config/io/helpers";
import { generateTypeData } from "@config/io/generateTypeData"; import { generateTypeData } from "@config/io/generateTypeData";
import { Flag } from "@icons"; import { Flag } from "@icons";
import DocsLayout from "@layouts/DocsLayout.astro"; import DocsLayout from "@layouts/DocsLayout.astro";
@ -50,7 +48,7 @@ const sidebarData = {
const superLink = data.super ? getQMLTypeLink(data.super) : null; const superLink = data.super ? getQMLTypeLink(data.super) : null;
const details = data.details const details = data.details
? await processQsMarkdown(data.details) ? await processMarkdown(data.details)
: null; : null;
--- ---
<DocsLayout title={`${route.name} - ${route.type}`} description={data?.description ?? ""}> <DocsLayout title={`${route.name} - ${route.type}`} description={data?.description ?? ""}>

View file

@ -1,7 +1,7 @@
--- ---
import DocsLayout from "@layouts/DocsLayout.astro"; import DocsLayout from "@layouts/DocsLayout.astro";
import { generateTypeData } from "@config/io/generateTypeData"; import { generateTypeData } from "@config/io/generateTypeData";
import { processQsMarkdown } from "@src/config/io/helpers"; import { processMarkdown } from "@src/config/io/markdown";
export async function getStaticPaths() { export async function getStaticPaths() {
const routes = await generateTypeData(); const routes = await generateTypeData();
@ -26,7 +26,7 @@ export async function getStaticPaths() {
} }
const { route, children } = Astro.props; const { route, children } = Astro.props;
const details = route.data.details const details = route.data.details
? await processQsMarkdown(route.data.details) ? await processMarkdown(route.data.details)
: null; : null;
--- ---