From e5dd11cddc8ae2404935602d5f960931f38707e2 Mon Sep 17 00:00:00 2001 From: Stacy Souza Date: Tue, 3 Feb 2026 09:38:09 -0800 Subject: [PATCH] removed experimental from devvit web --- .../devvit-web/devvit_web_overview.mdx | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/versioned_docs/version-0.12/capabilities/devvit-web/devvit_web_overview.mdx b/versioned_docs/version-0.12/capabilities/devvit-web/devvit_web_overview.mdx index 90edf5b..9a0b44a 100644 --- a/versioned_docs/version-0.12/capabilities/devvit-web/devvit_web_overview.mdx +++ b/versioned_docs/version-0.12/capabilities/devvit-web/devvit_web_overview.mdx @@ -1,4 +1,4 @@ -import DevvitWebArch from '../../assets/devvit_web/devvit_web_arch.png'; +import DevvitWebArch from "../../assets/devvit_web/devvit_web_arch.png"; # Devvit Web @@ -23,21 +23,19 @@ In addition, since you’re working with standard web technologies your apps sho Visit [https://developers.reddit.com/new](https://developers.reddit.com/new) and choose one of our templates or take a look at the github repositories: -* [React](https://github.com/reddit/devvit-template-react) -* [Phaser](https://github.com/reddit/devvit-template-phaser) -* [Three.js](https://github.com/reddit/devvit-template-threejs) -* [Hello World](https://github.com/reddit/devvit-template-hello-world) +- [React](https://github.com/reddit/devvit-template-react) +- [Phaser](https://github.com/reddit/devvit-template-phaser) +- [Three.js](https://github.com/reddit/devvit-template-threejs) +- [Hello World](https://github.com/reddit/devvit-template-hello-world) ## Limitations -As with most experimental features, there are some caveats. - -| Limitation | What it means | -| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can’t use packages that require long-running connections like streaming. | +| Limitation | What it means | +| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Serverless endpoints | The node server will run just long enough to execute your endpoint function and return a response, which means you can’t use packages that require long-running connections like streaming. | | Package limitations | Developers cannot use `fs` or external native packages. For now, we recommend using external services over the native dependencies, such as [StreamPot](https://streampot.io/) (instead of ffmpeg) and [OpenAI](https://platform.openai.com/docs/guides/embeddings) (instead of @xenova/transformers) . | -| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. | -| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) | +| Single request and single response handling only | Streaming or chunked responses and websockets are not supported. Long-polling is supported if it’s under the max request time. | +| No external requests from your client | You can’t have any external requests other than the app's webview domain. All backend responses are locked down to the webview domain via CSP. (Your backend can make external fetch requests though.) | Devvit Web still has the same technical requirements: @@ -47,7 +45,6 @@ Devvit Web still has the same technical requirements: - Max response size: 10MB - HTML/CSS/JS only - ## Devvit Web components Devvit Web uses endpoints between the client and server to make communication similar to standard web apps. A Devvit Web app has three components: @@ -59,10 +56,10 @@ Devvit Web uses endpoints between the client and server to make communication si Devvit Web templates all have the same file structure: ```tsx -- src - - client / // contains the webview code - - server / // endpoints for the client -- devvit.json; // the devvit config file +-src - + client / // contains the webview code + -server / // endpoints for the client + -devvit.json; // the devvit config file ``` Now, instead of passing messages with postMessage (old way), you’ll define `/api/endpoints` (new way). @@ -83,7 +80,11 @@ We also provide an authentication middleware so you don’t have to worry about All server endpoints must start with `/api/` (e.g. `/api/get-something` or `/api/widgets/42`). ::: -devvit web architecture +devvit web architecture ### Configuration in `devvit.json`