| | |
| | | import { FilePath, ServerSlug } from "../../path" |
| | | import { FilePath, FullSlug } from "../../util/path" |
| | | import { QuartzEmitterPlugin } from "../types" |
| | | |
| | | // @ts-ignore |
| | |
| | | import popoverScript from "../../components/scripts/popover.inline" |
| | | import styles from "../../styles/base.scss" |
| | | import popoverStyle from "../../components/styles/popover.scss" |
| | | import { BuildCtx } from "../../ctx" |
| | | import { StaticResources } from "../../resources" |
| | | import { BuildCtx } from "../../util/ctx" |
| | | import { StaticResources } from "../../util/resources" |
| | | import { QuartzComponent } from "../../components/types" |
| | | import { googleFontHref, joinStyles } from "../../theme" |
| | | import { googleFontHref, joinStyles } from "../../util/theme" |
| | | import { Features, transform } from "lightningcss" |
| | | |
| | | type ComponentResources = { |
| | |
| | | componentResources.afterDOMLoaded.push(plausibleScript) |
| | | } |
| | | |
| | | // spa |
| | | if (cfg.enableSPA) { |
| | | componentResources.afterDOMLoaded.push(spaRouterScript) |
| | | } else { |
| | |
| | | const postscript = joinScripts(componentResources.afterDOMLoaded) |
| | | const fps = await Promise.all([ |
| | | emit({ |
| | | slug: "index" as ServerSlug, |
| | | slug: "index" as FullSlug, |
| | | ext: ".css", |
| | | content: transform({ |
| | | filename: "index.css", |
| | |
| | | }).code.toString(), |
| | | }), |
| | | emit({ |
| | | slug: "prescript" as ServerSlug, |
| | | slug: "prescript" as FullSlug, |
| | | ext: ".js", |
| | | content: prescript, |
| | | }), |
| | | emit({ |
| | | slug: "postscript" as ServerSlug, |
| | | slug: "postscript" as FullSlug, |
| | | ext: ".js", |
| | | content: postscript, |
| | | }), |