You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the `cloudflare-vite-tutorial` directory in your editor of choice.
38
+
Next, open the `cloudflare-vite-tutorial` directory in your editor of choice.
39
39
40
40
#### Add the Cloudflare dependencies
41
41
@@ -55,6 +55,10 @@ export default defineConfig({
55
55
});
56
56
```
57
57
58
+
The Cloudflare Vite plugin doesn't require any configuration by default and will look for a `wrangler.jsonc`, `wrangler.json` or `wrangler.toml` in the root of your application.
59
+
60
+
Refer to the [API reference](/workers/vite-plugin/api/) for configuration options.
61
+
58
62
#### Create your Worker config file
59
63
60
64
<WranglerConfig>
@@ -145,7 +149,7 @@ main = "./worker/index.ts"
145
149
146
150
</WranglerConfig>
147
151
148
-
Setting the `not_found_handling` to `single-page-application` means that navigation requests that do not match a static asset will always return the `index.html` file.
152
+
The `main` field specifies the entry file for your Worker code.
149
153
150
154
#### Add your API Worker
151
155
@@ -257,7 +261,7 @@ Run `npm run build` to build your application.
257
261
If you inspect the `dist` directory, you will see that it contains two subdirectories:
258
262
259
263
-`client` - the client code that runs in the browser
260
-
-`cloudflare-vite-tutorial` - the Worker code and the output `wrangler.json`Worker configuration
264
+
-`cloudflare-vite-tutorial` - the Worker code alongside the output `wrangler.json` configuration file
0 commit comments