Skip to content

Commit e27b999

Browse files
committed
Add lit integration to render Lit web component markup included in render() functions during build
1 parent f7ca973 commit e27b999

5 files changed

Lines changed: 128 additions & 9 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { AstroIntegration, AstroRenderer } from 'astro'
2+
3+
declare module '@semantic-ui/astro-lit' {
4+
export function getContainerRenderer(): AstroRenderer
5+
export default function litIntegration(): AstroIntegration
6+
}

astro.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import AstroPWA from '@vite-pwa/astro'
2+
import icon from 'astro-icon'
3+
import lit from '@semantic-ui/astro-lit'
14
import mdx from '@astrojs/mdx'
2-
import sitemap from '@astrojs/sitemap'
3-
import vercelStatic from '@astrojs/vercel'
45
import sentry from '@sentry/astro'
6+
import sitemap from '@astrojs/sitemap'
57
import tailwindcss from '@tailwindcss/vite'
6-
import AstroPWA from '@vite-pwa/astro'
8+
import vercelStatic from '@astrojs/vercel'
79
import vtbot from 'astro-vtbot'
8-
import icon from 'astro-icon'
910
import { defineConfig } from 'astro/config'
1011
import { fileURLToPath } from 'node:url'
1112
import type { PluginOption } from 'vite'
@@ -49,6 +50,8 @@ const standardIntegrations = [
4950
/** Enable debug logging to see validation details */
5051
debug: true,
5152
}),
53+
/** Integration to render Lit templates during build */
54+
lit(),
5255
/** Inject package release (name@version) for tracking regressions between releases */
5356
packageRelease(),
5457
/** Inject privacy policy version from git commit date for GDPR record keeping */

package-lock.json

Lines changed: 113 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@glidejs/glide": "^3.7.1",
6060
"@nanostores/lit": "^0.2.3",
6161
"@nanostores/persistent": "^1.2.0",
62+
"@semantic-ui/astro-lit": "^5.1.1",
6263
"@sentry/astro": "^10.27.0",
6364
"@sentry/browser": "^10.27.0",
6465
"@shikijs/transformers": "^3.17.0",

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"@styles/*": ["src/styles/*"],
9393
"@test/*": ["test/*"],
9494
"astro-vtbot": ["@types/astro-vtbot"],
95+
"@semantic-ui/astro-lit": ["@types/semantic-ui__astro-lit/index.d.ts"],
9596
"unstorage": ["@types/unstorage/index.d.ts"],
9697
"unstorage/*": ["@types/unstorage/index.d.ts"],
9798
"unstorage/drivers/*": ["@types/unstorage/index.d.ts"]

0 commit comments

Comments
 (0)