Skip to content

Commit 12897e8

Browse files
committed
feat(www): migrate to module worker for cloudflare
1 parent a8b6bd3 commit 12897e8

File tree

7 files changed

+1708
-141
lines changed

7 files changed

+1708
-141
lines changed

apps/www/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.nuxt
55
.nitro
66
.cache
7+
.wrangler
78
dist
89

910
# Node dependencies

apps/www/app.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ export default defineAppConfig({
3939
to: '/overview/usage',
4040
description: 'Learn how to use AI Elements Vue in your project',
4141
target: '_self',
42-
}, {
43-
title: 'Components',
44-
to: '/components',
45-
description: 'Explore all available components and their usage',
46-
target: '_self',
4742
}],
4843
}, {
4944
title: 'Credits',

apps/www/content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AI Elements Vue is a component library built on top of shadcn-vue to help you bu
2525
::card
2626
---
2727
title: Shadcn Vue
28-
icon: my-icon:shadcn-vue
28+
icon: custom-icon:shadcn-vue
2929
icon-size: 26
3030
to: https://www.shadcn-vue.com
3131
target: _blank

apps/www/nuxt.config.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export default defineNuxtConfig({
55

66
plugins: ['~/plugins/ai-elements'],
77

8-
content: {
9-
markdown: {
10-
mdc: true,
8+
mdc: {
9+
highlight: {
10+
shikiEngine: 'javascript',
1111
},
1212
},
1313

@@ -30,7 +30,7 @@ export default defineNuxtConfig({
3030
icon: {
3131
customCollections: [
3232
{
33-
prefix: 'my-icon',
33+
prefix: 'custom-icon',
3434
dir: './assets/icons',
3535
},
3636
],
@@ -41,7 +41,17 @@ export default defineNuxtConfig({
4141
},
4242

4343
compatibilityDate: '2024-07-06',
44+
45+
sourcemap: false,
46+
47+
vite: {
48+
build: {
49+
sourcemap: false,
50+
chunkSizeWarningLimit: 1500,
51+
},
52+
},
53+
4454
nitro: {
45-
preset: 'cloudflare-pages',
55+
preset: 'cloudflare-module',
4656
},
4757
})

apps/www/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@repo/elements": "workspace:*",
1515
"@repo/examples": "workspace:*",
16-
"nuxt": "^3.17.6",
16+
"nuxt": "^3.18.0",
1717
"shadcn-docs-nuxt": "^1.1.1",
1818
"tailwindcss": "^4.1.13",
1919
"vue": "^3.5.17",

apps/www/wrangler.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name = "ai-elements-vue"
2+
main = ".output/server/index.mjs"
3+
compatibility_date = "2024-07-06"
4+
compatibility_flags = [ "nodejs_compat" ]
5+
routes = [ "www.ai-elements-vue.com/*" ]
6+
site = { bucket = ".output/public" }

0 commit comments

Comments
 (0)