Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 5bfde20

Browse files
committed
chore: fix docs module
1 parent 0b42e6e commit 5bfde20

File tree

9 files changed

+98
-434
lines changed

9 files changed

+98
-434
lines changed

components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* Typescript support for @@chakra-ui/vue-next1.0.0-alpha.13 auto-imported
2+
* Typescript support for @@chakra-ui/vue-next2.0.0-beta.0 auto-imported
33
* components using `unplugin-vue-components,`
44
*
55
* @see: https://github.com/antfu/unplugin-vue-components/#typescript
66
*
77
* This is a generated file. Do not edit it's contents.
88
*
9-
* This file was generated on 2022-12-12T05:56:22.565Z
9+
* This file was generated on 2022-12-21T00:42:42.934Z
1010
*/
1111

1212
import { ChakraProps, chakra } from "@chakra-ui/vue-system"

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
"nohoist": [
1616
"**/@nuxt/content",
1717
"**/@nuxt/content/**",
18+
"**/@nuxt/vite-builder",
19+
"**/@nuxt/vite-builder/**",
1820
"**/add",
1921
"**/add/**",
2022
"**/nuxt",
23+
"**/@nuxt/**",
24+
"**/nuxt",
2125
"**/nuxt/**",
2226
"**/@babel/core",
2327
"**/@babel/core/**",

website/modules/chakra.module.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineNuxtModule } from "@nuxt/kit"
2+
import { extractCritical } from "@emotion/server"
3+
import { hydrate } from "@emotion/css"
4+
export default defineNuxtModule({
5+
meta: {
6+
// Usually npm package name of your module
7+
name: "@chakra-ui/nuxt-module",
8+
// The key in `nuxt.config` that holds your module options
9+
configKey: "chakra",
10+
// Compatibility constraints
11+
compatibility: {
12+
// Semver version of supported nuxt versions
13+
nuxt: "^3.0.0",
14+
},
15+
},
16+
// Default configuration options for your module
17+
18+
async setup(moduleOptions, nuxt) {},
19+
})

website/nuxt.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ export default defineNuxtConfig({
44
routes: ["/docs/*", "/getting-started/*"],
55
},
66
},
7-
modules: ["@nuxt/content"],
7+
modules: [
8+
"@nuxt/content",
9+
(options, nuxt) => {
10+
nuxt.hook("nitro:config", (config) => {
11+
if (nuxt.options.dev) {
12+
// Prevent inlining emotion (+ the crucial css cache!) in dev mode
13+
config.externals.external ||= []
14+
config.externals.external.push("@emotion/server")
15+
}
16+
})
17+
},
18+
],
819
build: {
920
// @ts-ignore
1021
extend(config: { resolve: { alias: { vue$: string } } }, _ctx: any) {

website/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"@emotion/server": "^11.4.0",
2828
"@fontsource/dm-sans": "^4.5.9",
2929
"@fontsource/ibm-plex-mono": "^4.5.13",
30+
"@nuxt/vite-builder": "^3.0.0",
3031
"@nuxtjs/color-mode": "^3.2.0",
32+
"add": "^2.0.6",
3133
"feather-icons-paths": "^1.1.1",
3234
"highlight.js": "^11.7.0",
3335
"prismjs": "^1.29.0",

website/pages/foo.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<div :class="className">Hello World</div>
3+
</template>
4+
5+
<script lang="ts" setup>
6+
import { css } from "@emotion/css"
7+
8+
const className = css({
9+
backgroundColor: "tomato",
10+
color: "white",
11+
fontWeight: "bold",
12+
padding: "2rem 3rem",
13+
})
14+
</script>

website/plugins/chakra.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ChakraUIVuePlugin, { chakra, extendChakra } from "@chakra-ui/vue-next"
1+
import ChakraUIVuePlugin, { chakra, extendTheme } from "@chakra-ui/vue-next"
22
import { domElements } from "@chakra-ui/vue-system"
33

44
import customTheme from "../assets/custom-theme"
File renamed without changes.

0 commit comments

Comments
 (0)