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
* TODO: In next major version, only serve static assets in the `static` and `upload` directory.
100
+
*
101
+
* 1. In dev mode, the static assets generated by bundler will be served by the rsbuildDevMiddleware, and other file in `static` directory will be served by this middleware.
102
+
* 2. In prod mode, all the static assets in `static` and `upload` directory will be served by this middleware.
103
+
* 3. So some file not in `static` can be access in dev mode, but not in prod mode. Cause we can not serve all files in prod mode, as we should not expose server code in prod mode.
104
+
* 4. Through Modern.js not serve this file in prod mode, you can upload the files to a CDN.
105
+
*/
97
106
exportfunctioncreateStaticMiddleware(
98
107
options: ServerStaticOptions,
99
108
): Middleware{
@@ -107,7 +116,9 @@ export function createStaticMiddleware(
0 commit comments