@nuasite/nua 0.64.2 → 0.64.3
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/package.json +7 -7
- package/src/integration.ts +12 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuasite/nua",
|
|
3
|
-
"version": "0.64.
|
|
3
|
+
"version": "0.64.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"module": "src/index.ts",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@astrojs/markdown-remark": "7.3.4",
|
|
40
40
|
"@astrojs/mdx": "8.1.1",
|
|
41
41
|
"@astrojs/sitemap": "3.7.4",
|
|
42
|
-
"@nuasite/checks": "0.64.
|
|
43
|
-
"@nuasite/llm-enhancements": "0.64.
|
|
44
|
-
"@nuasite/cli": "0.64.
|
|
45
|
-
"@nuasite/cms": "0.64.
|
|
46
|
-
"@nuasite/components": "0.64.
|
|
47
|
-
"@nuasite/core": "0.64.
|
|
42
|
+
"@nuasite/checks": "0.64.3",
|
|
43
|
+
"@nuasite/llm-enhancements": "0.64.3",
|
|
44
|
+
"@nuasite/cli": "0.64.3",
|
|
45
|
+
"@nuasite/cms": "0.64.3",
|
|
46
|
+
"@nuasite/components": "0.64.3",
|
|
47
|
+
"@nuasite/core": "0.64.3",
|
|
48
48
|
"@tailwindcss/vite": "^4.2.2",
|
|
49
49
|
"@tailwindcss/typography": "^0.5.19",
|
|
50
50
|
"astro": "7.4.2",
|
package/src/integration.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import mdx from '@astrojs/mdx'
|
|
2
2
|
import sitemap from '@astrojs/sitemap'
|
|
3
3
|
import checks from '@nuasite/checks'
|
|
4
|
-
import cms, { addMarkdownPlugins, cmsRemarkPlugins, mergeConfigRedirectsInto } from '@nuasite/cms'
|
|
4
|
+
import cms, { addMarkdownPlugins, cmsRemarkPlugins, inlineNuasitePackages, mergeConfigRedirectsInto, userExternals } from '@nuasite/cms'
|
|
5
5
|
import tailwindcss from '@tailwindcss/vite'
|
|
6
6
|
import type { AstroConfig, AstroIntegration } from 'astro'
|
|
7
7
|
import pageMarkdown from '../../llm-enhancements/src'
|
|
@@ -19,7 +19,9 @@ export default function nua(options: NuaIntegrationOptions = {}): AstroIntegrati
|
|
|
19
19
|
|
|
20
20
|
// Tailwind is required — the CMS color/text-style system
|
|
21
21
|
// expects the host site to compile Tailwind utility classes.
|
|
22
|
-
|
|
22
|
+
// Every @nuasite package ships TypeScript source; in dev it has to stay
|
|
23
|
+
// inside Vite even when the CMS integration, which also adds this, is off.
|
|
24
|
+
const vitePlugins = [...tailwindcss(), inlineNuasitePackages({ keep: userExternals(config.vite) })]
|
|
23
25
|
|
|
24
26
|
// Add nuasite integrations
|
|
25
27
|
if (resolved.cms !== false) {
|
|
@@ -94,12 +96,14 @@ export default function nua(options: NuaIntegrationOptions = {}): AstroIntegrati
|
|
|
94
96
|
vite: {
|
|
95
97
|
plugins: vitePlugins,
|
|
96
98
|
ssr: {
|
|
97
|
-
// Without this,
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
99
|
+
// Without this, SSR externalizes the package and its TS barrel is
|
|
100
|
+
// loaded by the runtime instead of Vite. Under Bun (the nua CLI
|
|
101
|
+
// runtime) the nested `.astro` imports then resolve to file-path
|
|
102
|
+
// strings via Bun's file loader, and Astro renders the components
|
|
103
|
+
// as literal path-named tags: `<Form>` loses its `<form>` wrapper
|
|
104
|
+
// and submits silently do nothing. In dev, Astro's crawl lists the
|
|
105
|
+
// package as an explicit external, which wins over this entry, so
|
|
106
|
+
// `inlineNuasitePackages` above removes it from that list.
|
|
103
107
|
noExternal: ['@nuasite/components'],
|
|
104
108
|
},
|
|
105
109
|
},
|