Skip to content

Commit

Permalink
chore: 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 4a1e5d4 commit e09b8fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/react-ssr-workerd/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mkdirSync } from "node:fs";
import { tinyassert } from "@hiogawa/utils";
import { vitePluginLogger } from "@hiogawa/vite-plugin-ssr-middleware";
import { vitePluginWorkerd } from "@hiogawa/vite-plugin-workerd";
Expand Down Expand Up @@ -33,6 +34,13 @@ export default defineConfig((_env) => ({
});
},
},
{
// ensure wrangler.toml assets.directory exists
name: "ensure-wrangler-assets-directory",
config() {
mkdirSync("dist/client", { recursive: true });
},
},
],
environments: {
client: {
Expand Down

0 comments on commit e09b8fc

Please sign in to comment.