Skip to content

Commit

Permalink
fix: more ensure-wrangler-assets-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 23, 2025
1 parent 8d899af commit 9735e35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/react-ssr-workerd/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default defineConfig((_env) => ({
{
// ensure wrangler.toml assets.directory exists
name: "ensure-wrangler-assets-directory",
enforce: "pre",
config() {
mkdirSync("dist/client", { recursive: true });
},
Expand Down
9 changes: 9 additions & 0 deletions examples/vue-ssr-extra/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mkdirSync } from "node:fs";
import { vitePluginLogger } from "@hiogawa/vite-plugin-ssr-middleware";
import { vitePluginWorkerd } from "@hiogawa/vite-plugin-workerd";
import vue from "@vitejs/plugin-vue";
Expand Down Expand Up @@ -27,6 +28,14 @@ export default defineConfig((_env) => ({
},
}),
vitePluginVirtualIndexHtml(),
{
// ensure wrangler.toml assets.directory exists
name: "ensure-wrangler-assets-directory",
enforce: "pre",
config() {
mkdirSync("dist/client", { recursive: true });
},
},
],
environments: {
client: {
Expand Down

0 comments on commit 9735e35

Please sign in to comment.