Skip to content

Commit bdeb4d3

Browse files
committed
fix: demos not work in production
1 parent 4cddcef commit bdeb4d3

4 files changed

Lines changed: 800 additions & 1150 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Lint
22

33
on:
44
push:
5-
branches: [ "**" ]
5+
branches: ['**']
66
pull_request:
77

88
jobs:

‎docs/.vitepress/config.ts‎

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
import { defineConfig } from 'vitepress'
2-
import listHooks from '../../scripts/listHooks'
1+
import { defineConfig } from "vitepress";
2+
import listHooks from "../../scripts/listHooks";
33

4-
const hooks = listHooks()
4+
const hooks = listHooks();
55

66
export default defineConfig({
7-
title: 'Use Reacty',
8-
description: 'A collection of React hooks',
7+
vite: {
8+
resolve: {
9+
dedupe: ["react", "react-dom"],
10+
},
11+
},
12+
title: "Use Reacty",
13+
description: "A collection of React hooks",
914
themeConfig: {
1015
search: {
11-
provider: 'local',
16+
provider: "local",
1217
},
13-
logo: '/logo.png',
14-
nav: [{ text: 'Home', link: '/' }],
18+
logo: "/logo.png",
19+
nav: [{ text: "Home", link: "/" }],
1520
sidebar: [
1621
{
17-
text: 'Guide',
18-
items: [
19-
{ text: 'Getting Started', link: '/get-started' },
20-
],
22+
text: "Guide",
23+
items: [{ text: "Getting Started", link: "/get-started" }],
2124
},
2225
{
23-
text: 'Hooks',
26+
text: "Hooks",
2427
items: [
25-
...hooks.map(hook => ({
28+
...hooks.map((hook) => ({
2629
text: hook,
2730
link: `/hooks/${hook}`,
2831
})),
2932
],
3033
},
3134
],
3235
footer: {
33-
message: 'made with ❤️ by Xenos',
34-
copyright: '',
36+
message: "made with ❤️ by Xenos",
37+
copyright: "",
3538
},
3639
},
37-
})
40+
});

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lint:fix": "eslint --fix"
1313
},
1414
"dependencies": {
15-
"react": "^19.2.0",
15+
"react": "^19.1.0",
1616
"react-dom": "^19.2.0",
1717
"use-reacty": "workspace:*"
1818
},

0 commit comments

Comments
 (0)