Skip to content

Commit

Permalink
Prep release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jan 9, 2024
1 parent 28a0c49 commit 5df3055
Show file tree
Hide file tree
Showing 12 changed files with 161 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .changeset/isbot-version-four.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Fix issue with `isbot` v4 released on 1/1/2024

- `remix dev` wil now add `"isbot": "^4"` to `package.json` instead of using `latest`
- `remix dev` will now add `"isbot": "^4"` to `package.json` instead of using `latest`
- Update built-in `entry.server` files to work with both `isbot@3` and `isbot@4` for backwards-compatibility with Remix apps that have pinned `isbot` to v3
- Templates are updated to use `isbot@4` moving forward via `create-remix`
2 changes: 1 addition & 1 deletion .changeset/spa-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ To run your SPA, you serve your client assets directory via an HTTP server:
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://reactrouter.com/en/main/guides/spa-mode].
For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].
162 changes: 140 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,58 @@ We manage release notes in this file instead of the paginated Github Releases Pa
<summary>Table of Contents</summary>

- [Remix Releases](#remix-releases)
- [v2.4.1](#v241)
- [v2.5.0](#v250)
- [What's Changed](#whats-changed)
- [SPA Mode (unstable)](#spa-mode-unstable)
- [Server Bundles (unstable)](#server-bundles-unstable)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes)
- [Updated Dependencies](#updated-dependencies)
- [Changes by Package](#changes-by-package)
- [v2.4.1](#v241)
- [Patch Changes](#patch-changes-1)
- [Updated Dependencies](#updated-dependencies-1)
- [Changes by Package](#changes-by-package-1)
- [v2.4.0](#v240)
- [What's Changed](#whats-changed)
- [What's Changed](#whats-changed-1)
- [Client Data](#client-data)
- [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath)
- [Vite Updates (Unstable)](#vite-updates-unstable)
- [Minor Changes](#minor-changes)
- [Patch Changes](#patch-changes-1)
- [Updated Dependencies](#updated-dependencies-1)
- [Changes by Package](#changes-by-package-1)
- [v2.3.1](#v231)
- [Minor Changes](#minor-changes-1)
- [Patch Changes](#patch-changes-2)
- [Updated Dependencies](#updated-dependencies-2)
- [Changes by Package](#changes-by-package-2)
- [v2.3.0](#v230)
- [What's Changed](#whats-changed-1)
- [Stabilized `useBlocker`](#stabilized-useblocker)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-1)
- [v2.3.1](#v231)
- [Patch Changes](#patch-changes-3)
- [Updated Dependencies](#updated-dependencies-3)
- [Changes by Package](#changes-by-package-3)
- [v2.2.0](#v220)
- [v2.3.0](#v230)
- [What's Changed](#whats-changed-2)
- [Vite!](#vite)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag](#persistence-future-flag)
- [Stabilized `useBlocker`](#stabilized-useblocker)
- [`unstable_flushSync` API](#unstable_flushsync-api)
- [Minor Changes](#minor-changes-2)
- [Patch Changes](#patch-changes-4)
- [Updated Dependencies](#updated-dependencies-4)
- [Changes by Package](#changes-by-package-4)
- [v2.1.0](#v210)
- [v2.2.0](#v220)
- [What's Changed](#whats-changed-3)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Vite!](#vite)
- [New Fetcher APIs](#new-fetcher-apis)
- [Persistence Future Flag](#persistence-future-flag)
- [Minor Changes](#minor-changes-3)
- [Patch Changes](#patch-changes-5)
- [Updated Dependencies](#updated-dependencies-5)
- [Changes by Package](#changes-by-package-5)
- [v2.0.1](#v201)
- [v2.1.0](#v210)
- [What's Changed](#whats-changed-4)
- [View Transitions](#view-transitions)
- [Stable `createRemixStub`](#stable-createremixstub)
- [Minor Changes](#minor-changes-4)
- [Patch Changes](#patch-changes-6)
- [Updated Dependencies](#updated-dependencies-6)
- [Changes by Package](#changes-by-package-6)
- [v2.0.1](#v201)
- [Patch Changes](#patch-changes-7)
- [Changes by Package 🔗](#changes-by-package-)
- [v2.0.0](#v200)
- [Breaking Changes](#breaking-changes)
Expand All @@ -68,8 +76,8 @@ We manage release notes in this file instead of the paginated Github Releases Pa
- [Breaking Type Changes](#breaking-type-changes)
- [New Features](#new-features)
- [Other Notable Changes](#other-notable-changes)
- [Updated Dependencies](#updated-dependencies-6)
- [Changes by Package](#changes-by-package-6)
- [Updated Dependencies](#updated-dependencies-7)
- [Changes by Package](#changes-by-package-7)

</details>

Expand Down Expand Up @@ -117,6 +125,116 @@ Date: YYYY-MM-DD
-->

## v2.5.0

Date: 2024-01-10

### What's Changed

#### SPA Mode (unstable)

SPA Mode ([RFC](https://github.com/remix-run/remix/discussions/7638)) allows you to generate your Remix app as a standalone SPA served from a static `index.html` file. You can opt into SPA Mode by setting `unstable_ssr: false` in your Remix Vite plugin config:

```js
// vite.config.ts
import { unstable_vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [remix({ unstable_ssr: false })],
});
```

Development in SPA Mode is just like a normal Remix app, and still uses the Remix dev server for HMR/HDR:

```sh
remix vite:dev
```

Building in SPA Mode will generate an `index.html` file in your client assets directory:

```sh
remix vite:build
```

To run your SPA, you serve your client assets directory via an HTTP server:

```sh
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].

#### Server Bundles (unstable)

This is an advanced feature designed for hosting provider integrations where you may want to split server code into multiple request handlers. When compiling your app into multiple server bundles, there will need to be a custom routing layer in front of your app directing requests to the correct bundle. This feature is currently unstable and only designed to gather early feedback.

You can control the server bundles generated by your Remix Vite build by setting the `unstable_serverBundles` option in your vite config:

```ts
import { unstable_vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [
remix({
unstable_serverBundles: ({ branch }) => {
const isAuthenticatedRoute = branch.some(
(route) => route.id === "routes/_authenticated"
);

return isAuthenticatedRoute ? "authenticated" : "unauthenticated";
},
}),
],
});
```

### Minor Changes

- Add unstable support for "SPA Mode" ([#8457](https://github.com/remix-run/remix/pull/8457))
- Add `unstable_serverBundles` option to Vite plugin to support splitting server code into multiple request handlers ([#8332](https://github.com/remix-run/remix/pull/8332))

### Patch Changes

- `create-remix`: Only update `*` versions for Remix dependencies ([#8458](https://github.com/remix-run/remix/pull/8458))
- `remix-serve`: Don't try to load sourcemaps if they don't exist on disk ([#8446](https://github.com/remix-run/remix/pull/8446))
- `@remix-run/dev`: Fix issue with `isbot@4` released on 1/1/2024 ([#8415](https://github.com/remix-run/remix/pull/8415))
- `remix dev` will now add `"isbot": "^4"` to `package.json` instead of using `latest`
- Update built-in `entry.server` files to work with both `isbot@3` and `isbot@4` for backwards-compatibility with Remix apps that have pinned `isbot@3`
- Templates are updated to use `isbot@4` moving forward via `create-remix`
- `@remix-run/dev`: Vite - Fix HMR issues when altering exports for non-rendered routes ([#8157](https://github.com/remix-run/remix/pull/8157))
- `@remix-run/dev`: Vite - Default `NODE_ENV` to `"production"` when running `remix vite:build` command ([#8405](https://github.com/remix-run/remix/pull/8405))
- `@remix-run/dev`: Vite - Remove Vite plugin config option `serverBuildPath` in favor of separate `serverBuildDirectory` and `serverBuildFile` options ([#8332](https://github.com/remix-run/remix/pull/8332))
- `@remix-run/dev`: Vite - Loosen strict route exports restriction, reinstating support for non-Remix route exports ([#8420](https://github.com/remix-run/remix/pull/8420))
- `@remix-run/react`: Vite - Fix type conflict with `import.meta.hot` from the existing Remix compiler ([#8459](https://github.com/remix-run/remix/pull/8459))
- `@remix-run/server-runtime`: Updated `cookie` dependency to [`0.6.0`](https://github.com/jshttp/cookie/blob/master/HISTORY.md#060--2023-11-06) to inherit support for the [`Partitioned`](https://developer.mozilla.org/en-US/docs/Web/Privacy/Partitioned_cookies) attribute ([#8375](https://github.com/remix-run/remix/pull/8375))

### Updated Dependencies

- [`[email protected]`](https://github.com/remix-run/react-router/releases/tag/react-router%406.21.2)
- [`@remix-run/[email protected]`](https://github.com/remix-run/react-router/blob/main/packages/router/CHANGELOG.md#1142)

### Changes by Package

- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/create-remix/CHANGELOG.md#250)
- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-architect/CHANGELOG.md#250)
- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-cloudflare/CHANGELOG.md#250)
- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-cloudflare-pages/CHANGELOG.md#250)
- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-cloudflare-workers/CHANGELOG.md#250)
- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-css-bundle/CHANGELOG.md#250)
- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-deno/CHANGELOG.md#250)
- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-dev/CHANGELOG.md#250)
- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-eslint-config/CHANGELOG.md#250)
- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-express/CHANGELOG.md#250)
- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-node/CHANGELOG.md#250)
- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-react/CHANGELOG.md#250)
- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-serve/CHANGELOG.md#250)
- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-server-runtime/CHANGELOG.md#250)
- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.5.0/packages/remix-testing/CHANGELOG.md#250)

**Full Changelog**: [`v2.4.1...v2.5.0`](https://github.com/remix-run/remix/compare/[email protected]@2.5.0)

## v2.4.1

Date: 2023-12-22
Expand Down
11 changes: 8 additions & 3 deletions docs/guides/spa-mode.md → docs/future/spa-mode.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: SPA Mode
title: SPA Mode (Unstable)
---

# SPA Mode
# SPA Mode (Unstable)

From the beginning, Remix's opinion has always been that you own your server architecture. This is why Remix is built on top of the [Web Fetch API][fetch] and can run on any modern [runtime][runtimes] via built-in (or community-provided) adapters. While we believe that having a server provides the best UX/Performance/SEO/etc. for _most_ apps, it is also undeniable that there exist plenty of valid use cases for a Single Page Application in the real world:

Expand All @@ -13,6 +13,8 @@ From the beginning, Remix's opinion has always been that you own your server arc

That's why we added support for **SPA Mode** in [2.5.0][2.5.0] (per this [RFC][rfc]), which builds heavily on top of the [Client Data][client-data] APIs.

<docs-info>SPA Mode requires your app to be using Vite and the [Remix Vite Plugin][remix-vite]</docs-info>

## What is SPA Mode?

SPA Mode is basically what you'd get if you had your own [React Router + Vite][rr-setup] setup using `createBrowserRouter`/`RouterProvider`, but along with some extra Remix goodies:
Expand Down Expand Up @@ -80,6 +82,8 @@ app.get("*", (req, res, next) =>

## Notes/Caveats

- SPA Mode only works when using Vite and the [Remix Vite plugin][remix-vite]

- You cannot use server APIs such as `headers`, `loader`, and `action` -- the build will throw an error if you export them

- You can only export a `HydrateFallback` from your `root.tsx` in SPA Mode -- the build will throw an error if you export one from any other routes.
Expand Down Expand Up @@ -111,7 +115,7 @@ Once you've got all your routes living in their own files, you can:
- Add a `root.tsx` with a `default` export and a `HydrateFallback` - this replaces the `index.html` file from your React Router app

[rfc]: https://github.com/remix-run/remix/discussions/7638
[client-data]: ./client-data
[client-data]: ../guides/client-data
[2.5.0]: https://github.com/remix-run/remix/blob/main/CHANGELOG.md#v250
[fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
[runtimes]: ../discussion/runtimes
Expand All @@ -123,3 +127,4 @@ Once you've got all your routes living in their own files, you can:
[links]: ../components/links
[migrating-rr]: https://remix.run/docs/en/main/guides/migrating-react-router-app
[client-data-2]: https://remix.run/docs/en/main/guides/client-data
[remix-vite]: ../future/vite.md
4 changes: 2 additions & 2 deletions integration/spa-mode-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ test.describe("SPA Mode", () => {
let stderr = result.stderr.toString("utf8");
expect(stderr).toMatch(
"SPA Mode: 3 invalid route export(s) in `routes/invalid-exports.tsx`: " +
"`headers`, `loader`, `action`. See https://remix.run/guides/spa-mode " +
"`headers`, `loader`, `action`. See https://remix.run/future/spa-mode " +
"for more information."
);
});
Expand Down Expand Up @@ -242,7 +242,7 @@ test.describe("SPA Mode", () => {
expect(stderr).toMatch(
"SPA Mode: Invalid `HydrateFallback` export found in `routes/invalid-exports.tsx`. " +
"`HydrateFallback` is only permitted on the root route in SPA Mode. " +
"See https://remix.run/guides/spa-mode for more information."
"See https://remix.run/future/spa-mode for more information."
);
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://reactrouter.com/en/main/guides/spa-mode].
For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].

### Patch Changes

Expand All @@ -71,7 +71,7 @@
- Vite: Loosen strict route exports restriction, reinstating support for non-Remix route exports ([#8420](https://github.com/remix-run/remix/pull/8420))
- Fix issue with `isbot` v4 released on 1/1/2024 ([#8415](https://github.com/remix-run/remix/pull/8415))

- `remix dev` wil now add `"isbot": "^4"` to `package.json` instead of using `latest`
- `remix dev` will now add `"isbot": "^4"` to `package.json` instead of using `latest`
- Update built-in `entry.server` files to work with both `isbot@3` and `isbot@4` for backwards-compatibility with Remix apps that have pinned `isbot` to v3
- Templates are updated to use `isbot@4` moving forward via `create-remix`

Expand Down
4 changes: 2 additions & 2 deletions packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
let str = serverOnlyExports.map((e) => `\`${e}\``).join(", ");
let message =
`SPA Mode: ${serverOnlyExports.length} invalid route export(s) in ` +
`\`${route.file}\`: ${str}. See https://remix.run/guides/spa-mode ` +
`\`${route.file}\`: ${str}. See https://remix.run/future/spa-mode ` +
`for more information.`;
throw Error(message);
}
Expand All @@ -1162,7 +1162,7 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
let message =
`SPA Mode: Invalid \`HydrateFallback\` export found in ` +
`\`${route.file}\`. \`HydrateFallback\` is only permitted on ` +
`the root route in SPA Mode. See https://remix.run/guides/spa-mode ` +
`the root route in SPA Mode. See https://remix.run/future/spa-mode ` +
`for more information.`;
throw Error(message);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://reactrouter.com/en/main/guides/spa-mode].
For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].

### Patch Changes

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-server-runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://reactrouter.com/en/main/guides/spa-mode].
For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].

## 2.4.1

Expand Down
2 changes: 1 addition & 1 deletion packages/remix-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
npx http-server build/client
```

For more information, please refer to the [SPA Mode docs][https://reactrouter.com/en/main/guides/spa-mode].
For more information, please refer to the [SPA Mode docs][https://remix.run/future/spa-mode].

### Patch Changes

Expand Down
2 changes: 1 addition & 1 deletion templates/spa/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# templates/spa

This template leverages [Remix SPA Mode](https://remix.run/docs/en/main/guides/spa-mode) to build your app as a Single-Page Application using [Client Data](https://remix.run/docs/en/main/guides/client-data) for all of you data loads and mutations.
This template leverages [Remix SPA Mode](https://remix.run/docs/en/main/future/spa-mode) to build your app as a Single-Page Application using [Client Data](https://remix.run/docs/en/main/guides/client-data) for all of you data loads and mutations.

⚠️ This is built on top of the Remix Vite template. Remix support for Vite is currently unstable and not recommended for production.

Expand Down
2 changes: 1 addition & 1 deletion templates/spa/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Index() {
<li>
<a
target="_blank"
href="https://remix.run/guides/spa-mode"
href="https://remix.run/future/spa-mode"
rel="noreferrer"
>
SPA Mode Guide
Expand Down

0 comments on commit 5df3055

Please sign in to comment.