Skip to content

Commit ddbc90e

Browse files
committed
Reordered content in Static Assets page
1 parent c3b8210 commit ddbc90e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/content/docs/workers/vite-plugin/reference/static-assets.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ description: Static assets and the Vite plugin
88

99
import { WranglerConfig } from "~/components";
1010

11+
The Vite plugin does not require that you provide the `assets` field in order to enable assets and instead determines whether assets should be included based on whether the `client` environment has been built.
12+
By default, the `client` environment is built if there is an `index.html` file in the root of your project or if `build.rollupOptions.input` is specified in the Vite config.
13+
14+
:::note
1115
When using the Cloudflare Vite plugin, the `client` environment is deployed as your static assets.
1216
This typically includes files such as static HTML, front-end JavaScript, CSS, images and fonts.
1317
For more information about using static assets in Vite, refer to [Static Asset Handling](https://vite.dev/guide/assets).
14-
15-
The Vite plugin does not require that you provide the `assets` field in order to enable assets and instead determines whether assets should be included based on whether the `client` environment has been built.
16-
By default, the `client` environment is built if there is an `index.html` file in the root of your project or if `build.rollupOptions.input` is specified in the Vite config.
18+
:::
1719

1820
On running `vite build`, an output `wrangler.json` configuration file is generated as part of the build output.
1921
The `assets.directory` field in this file is automatically populated with the path to your `client` build output.

0 commit comments

Comments
 (0)