@brandon_m_behring/book-scaffold-astro 3.0.0-alpha.13 → 3.0.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +18 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -224,8 +224,14 @@ async function defineBookConfig(opts) {
|
|
|
224
224
|
const remarkPlugins = [];
|
|
225
225
|
const rehypePlugins = [];
|
|
226
226
|
if (profile === "academic") {
|
|
227
|
-
const { default: remarkMath } = await import(
|
|
228
|
-
|
|
227
|
+
const { default: remarkMath } = await import(
|
|
228
|
+
/* @vite-ignore */
|
|
229
|
+
"remark-math"
|
|
230
|
+
);
|
|
231
|
+
const { default: rehypeKatex } = await import(
|
|
232
|
+
/* @vite-ignore */
|
|
233
|
+
"rehype-katex"
|
|
234
|
+
);
|
|
229
235
|
const { ssmMacros: ssmMacros2 } = await Promise.resolve().then(() => (init_katex_macros(), katex_macros_exports));
|
|
230
236
|
remarkPlugins.push(remarkMath);
|
|
231
237
|
rehypePlugins.push([
|
|
@@ -270,10 +276,19 @@ async function defineBookConfig(opts) {
|
|
|
270
276
|
void _extraIntegrations;
|
|
271
277
|
void _extraStyles;
|
|
272
278
|
void _markdown;
|
|
279
|
+
const katexExternals = profile === "academic" ? [] : ["remark-math", "rehype-katex", "katex"];
|
|
273
280
|
const config = {
|
|
274
281
|
...rest,
|
|
275
282
|
integrations,
|
|
276
|
-
markdown
|
|
283
|
+
markdown,
|
|
284
|
+
vite: {
|
|
285
|
+
build: {
|
|
286
|
+
rollupOptions: {
|
|
287
|
+
external: katexExternals
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
...rest.vite ?? {}
|
|
291
|
+
}
|
|
277
292
|
};
|
|
278
293
|
return config;
|
|
279
294
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brandon_m_behring/book-scaffold-astro",
|
|
3
3
|
"description": "Astro 6 + MDX toolkit for long-form technical books. Profile-aware (academic / tools / minimal); ships Tufte typography, KaTeX, BibTeX citations, Pagefind, Cloudflare Workers deploy. See PACKAGE_DESIGN.md for the API contract.",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Brandon Behring",
|