diff --git a/CHANGELOG.md b/CHANGELOG.md index 52f038a76a..fe19c029c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -329,29 +329,26 @@ For Remix consumers migrating to React Router, the `vitePlugin` and `cloudflareD +import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare"; ``` -**Removed Vite Plugin `manifest` option** +**Removed `manifest` option** For Remix consumers migrating to React Router, the Vite plugin's `manifest` option has been removed. The `manifest` option been superseded by the more powerful `buildEnd` hook since it's passed the `buildManifest` argument. You can still write the build manifest to disk if needed, but you'll most likely find it more convenient to write any logic depending on the build manifest within the `buildEnd` hook itself. ([#11573](https://github.com/remix-run/react-router/pull/11573)) If you were using the `manifest` option, you can replace it with a `buildEnd` hook that writes the manifest to disk like this: ```js -import { reactRouter } from "@react-router/dev/vite"; +// react-router.config.ts +import { type Config } from "@react-router/dev/config"; import { writeFile } from "node:fs/promises"; export default { - plugins: [ - reactRouter({ - async buildEnd({ buildManifest }) { - await writeFile( - "build/manifest.json", - JSON.stringify(buildManifest, null, 2), - "utf-8" - ); - }, - }), - ], -}; + async buildEnd({ buildManifest }) { + await writeFile( + "build/manifest.json", + JSON.stringify(buildManifest, null, 2), + "utf-8" + ); + }, +} satisfies Config; ``` #### Exposed Router Promises