Skip to content

Commit

Permalink
chore: update vite (#8)
Browse files Browse the repository at this point in the history
* chore: update vite

* chore: permalink

* chore: remove own deps optimization

* chore: deps

* fix: wrong commit

* chore: tweak
  • Loading branch information
hi-ogawa authored Apr 4, 2024
1 parent 70e30d9 commit a878cdd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 117 deletions.
97 changes: 0 additions & 97 deletions examples/react-server/vite-plugin-environment-optimize-deps.ts

This file was deleted.

13 changes: 5 additions & 8 deletions examples/react-server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import { createDebug, tinyassert, typedBoolean } from "@hiogawa/utils";
import { __global } from "./src/global";
import react from "@vitejs/plugin-react";
import { vitePluginSsrMiddleware } from "../react-ssr/vite.config";
import {
vitePluginEnvironmentOptimizeDeps,
vitePluginFixJsxDEV,
} from "./vite-plugin-environment-optimize-deps";

const debug = createDebug("app");

Expand All @@ -27,10 +23,6 @@ export default defineConfig((env) => ({
preview: new URL("./dist/server/index.js", import.meta.url).toString(),
}),
vitePluginReactServer(),
vitePluginEnvironmentOptimizeDeps({
name: "react-server",
}),
vitePluginFixJsxDEV(),
vitePluginSilenceUseClientBuildWarning(),
],

Expand Down Expand Up @@ -59,6 +51,11 @@ export default defineConfig((env) => ({
// [feedback] same as react-ssr
build: env.isPreview ? { outDir: "dist/client" } : {},

ssr: {
// [feedback] deps optimization platform per environment?
target: env.command === "serve" ? "webworker" : undefined,
},

builder: {
async buildEnvironments(builder, build) {
await build(builder.environments["react-server"]!);
Expand Down
Binary file added misc/vite-5.2.7.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prettier": "^3.2.5",
"tsx": "^4.7.1",
"typescript": "^5.4.3",
"vite": "https://github.com/hi-ogawa/vite-environment-examples/raw/main/misc/vite-5.2.6-patch-2.tgz"
"vite": "https://github.com/hi-ogawa/vite-environment-examples/raw/c09f60f829fb6176eb20ce428757e4a8d09c8db9/misc/vite-5.2.7.tgz"
},
"packageManager": "[email protected]+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589",
"volta": {
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a878cdd

Please sign in to comment.