Skip to content

Commit c43f3dc

Browse files
committed
chore: update dependencies and configuration
1 parent f8c8e9c commit c43f3dc

9 files changed

+313
-464
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"node": "22.x",
3434
"pnpm": "10.x"
3535
},
36-
"packageManager": "pnpm@10.5.2",
36+
"packageManager": "pnpm@10.6.1",
3737
"homepage": "https://ui.resolid.tech",
3838
"repository": {
3939
"type": "git",

packages/react-ui/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
"babel-plugin-react-compiler": "beta",
5151
"jsdom": "^26.0.0",
5252
"tsup": "^8.4.0",
53-
"vitest": "^3.0.7",
53+
"vitest": "^3.0.8",
5454
"vitest-axe": "pre"
5555
},
5656
"peerDependencies": {
5757
"react": "^19.0.0",
5858
"react-dom": "^19.0.0",
59-
"tailwindcss": "^4.0.10"
59+
"tailwindcss": "^4.0.11"
6060
},
6161
"homepage": "https://ui.resolid.tech",
6262
"repository": {

pnpm-lock.yaml

+242-408
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

website/.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
.vite-inspect/
66

77
# env files
8-
.env
9-
.env.dev
10-
.env.test
11-
.env.prod
8+
.env.local
9+
.env.*.local
1210

1311
# resolid
1412
.resolid/

website/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"lint": "eslint .",
77
"typegen": "react-router typegen",
88
"typecheck": "tsc --noEmit --project tsconfig.check.json",
9-
"dev": "react-router dev",
10-
"build": "react-router build",
9+
"dev": "vite dev",
10+
"build": "vite build",
1111
"start": "NODE_ENV=production SERVER_PORT=3001 node ./build/server/server.mjs"
1212
},
1313
"dependencies": {
1414
"@mdx-js/react": "^3.1.0",
15-
"@react-router/node": "^7.2.0",
15+
"@react-router/node": "^7.3.0",
1616
"@resolid/react-ui": "workspace:^",
1717
"@resolid/utils": "^0.3.3",
1818
"@tailwindcss/typography": "^0.5.16",
@@ -23,19 +23,19 @@
2323
"mdast-util-to-string": "^4.0.0",
2424
"react": "^19.0.0",
2525
"react-dom": "^19.0.0",
26-
"react-router": "^7.2.0",
27-
"tailwindcss": "^4.0.10",
26+
"react-router": "^7.3.0",
27+
"tailwindcss": "^4.0.11",
2828
"unist-util-visit": "^5.0.0",
2929
"yaml": "^2.7.0"
3030
},
3131
"devDependencies": {
3232
"@mdx-js/rollup": "^3.1.0",
33-
"@react-router/dev": "^7.2.0",
33+
"@react-router/dev": "^7.3.0",
3434
"@resolid/config": "^3.3.3",
35-
"@resolid/flex-routes": "^1.1.12",
36-
"@resolid/react-router-hono": "^1.1.15",
35+
"@resolid/flex-routes": "^1.1.13",
36+
"@resolid/react-router-hono": "^1.2.0",
3737
"@shikijs/rehype": "^3.1.0",
38-
"@tailwindcss/vite": "^4.0.10",
38+
"@tailwindcss/vite": "^4.0.11",
3939
"@types/react": "^19.0.10",
4040
"@types/react-dom": "^19.0.4",
4141
"babel-plugin-react-compiler": "beta",
@@ -46,7 +46,7 @@
4646
"remark-frontmatter": "^5.0.0",
4747
"remark-gfm": "^4.0.1",
4848
"unist-util-visit": "^5.0.0",
49-
"vite": "^6.2.0",
49+
"vite": "^6.2.1",
5050
"vite-plugin-babel": "^1.3.0",
5151
"vite-plugin-inspect": "^10.3.0",
5252
"vite-tsconfig-paths": "^5.1.4"

website/plugins/vite-copy.js website/plugins/vite-ssr-copy.js

+15-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,24 @@ import { cwd } from "node:process";
1010
export default function (options) {
1111
const root = cwd();
1212

13-
let config;
1413
let copied = false;
14+
let rootDir;
15+
let outputDir;
1516

1617
return {
1718
name: "vite-plugin-copy",
1819
apply: "build",
19-
configResolved(_config) {
20-
config = _config;
20+
configResolved(config) {
21+
rootDir = config.root;
22+
},
23+
applyToEnvironment(environment) {
24+
if (environment.name !== "ssr") {
25+
return false;
26+
}
27+
28+
outputDir = environment.config.build.outDir;
29+
30+
return true;
2131
},
2232
async writeBundle() {
2333
if (copied) {
@@ -33,8 +43,8 @@ export default function (options) {
3343
for (const matchedPath of matchedPaths) {
3444
const relativeMatchedPath = isAbsolute(matchedPath) ? relative(root, matchedPath) : matchedPath;
3545

36-
const resolvedSrc = resolve(config.root, relativeMatchedPath);
37-
const resolvedDest = resolve(config.root, config.build.outDir, relativeMatchedPath);
46+
const resolvedSrc = resolve(rootDir, relativeMatchedPath);
47+
const resolvedDest = resolve(rootDir, outputDir, relativeMatchedPath);
3848

3949
await cp(resolvedSrc, resolvedDest, { recursive: true });
4050
}

website/react-router.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ export default {
2222
future: {
2323
unstable_optimizeDeps: true,
2424
unstable_splitRouteModules: true,
25+
unstable_viteEnvironmentApi: true,
2526
},
2627
} satisfies Config;

website/vite.config.ts

+40-34
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import tsconfigPaths from "vite-tsconfig-paths";
1616
import remarkDocgen from "./plugins/remark-docgen";
1717
import remarkGithubAlert from "./plugins/remark-github-alert";
1818
import remarkRemove from "./plugins/remark-remove";
19-
import viteCopy from "./plugins/vite-copy";
19+
import viteSsrCopy from "./plugins/vite-ssr-copy";
2020

21-
export default defineConfig(({ command, isSsrBuild }) => {
21+
export default defineConfig(({ command }) => {
2222
const isBuild = command == "build";
2323

2424
const __dirname = fileURLToPath(new URL(".", import.meta.url));
@@ -83,44 +83,50 @@ export default defineConfig(({ command, isSsrBuild }) => {
8383
}),
8484
!isBuild && tsconfigPaths(),
8585
!isBuild && viteInspect(),
86-
isBuild &&
87-
isSsrBuild &&
88-
viteCopy({
89-
targets: ["src/routes/docs/_mdx/**/*.mdx"],
90-
}),
86+
viteSsrCopy({
87+
targets: ["src/routes/docs/_mdx/**/*.mdx"],
88+
}),
9189
].filter(Boolean),
90+
environments: {
91+
ssr: {
92+
build: {
93+
target: "node22",
94+
rollupOptions: {
95+
output: {
96+
hoistTransitiveImports: false,
97+
manualChunks: undefined,
98+
},
99+
},
100+
},
101+
},
102+
},
92103
build: {
93-
target: isSsrBuild ? "node22" : "modules",
94-
cssTarget: ["edge88", "firefox78", "chrome87", "safari14"],
95104
rollupOptions: {
96105
output: {
97-
hoistTransitiveImports: false,
98-
manualChunks: isSsrBuild
99-
? undefined
100-
: (id) => {
101-
if (
102-
id.includes("/node_modules/react/") ||
103-
id.includes("/node_modules/react-dom/") ||
104-
id.includes("/node_modules/react-is/") ||
105-
id.includes("/node_modules/scheduler/")
106-
) {
107-
return "react";
108-
}
106+
manualChunks: (id) => {
107+
if (
108+
id.includes("/node_modules/react/") ||
109+
id.includes("/node_modules/react-dom/") ||
110+
id.includes("/node_modules/react-is/") ||
111+
id.includes("/node_modules/scheduler/")
112+
) {
113+
return "react";
114+
}
109115

110-
if (
111-
id.includes("/node_modules/@react-router/") ||
112-
id.includes("/node_modules/react-router/") ||
113-
id.includes("/node_modules/turbo-stream/") ||
114-
id.includes("react-router/with-props") ||
115-
id.includes("react-router-meta")
116-
) {
117-
return "react-router";
118-
}
116+
if (
117+
id.includes("/node_modules/@react-router/") ||
118+
id.includes("/node_modules/react-router/") ||
119+
id.includes("/node_modules/turbo-stream/") ||
120+
id.includes("react-router/with-props") ||
121+
id.includes("react-router-meta")
122+
) {
123+
return "react-router";
124+
}
119125

120-
if (id.includes("src/components/history-link.tsx") || id.includes("src/components/sprite-icon.tsx")) {
121-
return "components";
122-
}
123-
},
126+
if (id.includes("src/components/history-link.tsx") || id.includes("src/components/sprite-icon.tsx")) {
127+
return "components";
128+
}
129+
},
124130
},
125131
},
126132
},

0 commit comments

Comments
 (0)