@remix-run/static-middleware 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ npm i remix
|
|
|
21
21
|
Static middleware is useful for serving static files from a directory.
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import { createRouter } from 'remix/
|
|
25
|
-
import { staticFiles } from 'remix/static
|
|
24
|
+
import { createRouter } from 'remix/router'
|
|
25
|
+
import { staticFiles } from 'remix/middleware/static'
|
|
26
26
|
|
|
27
27
|
let router = createRouter({
|
|
28
28
|
middleware: [staticFiles('./public')],
|
|
@@ -33,7 +33,7 @@ router.get('/', () => new Response('Home'))
|
|
|
33
33
|
|
|
34
34
|
### With Cache Control
|
|
35
35
|
|
|
36
|
-
Internally, the `staticFiles()` middleware uses the [`createFileResponse()` helper from
|
|
36
|
+
Internally, the `staticFiles()` middleware uses the [`createFileResponse()` helper from `remix/response`](https://github.com/remix-run/remix/tree/main/packages/response/README.md#file-responses) to send files with full HTTP semantics. This means it also accepts the same options as the `createFileResponse()` helper.
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
39
|
let router = createRouter({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remix-run/static-middleware",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Middleware for serving static files from the filesystem",
|
|
5
5
|
"author": "Michael Jackson <mjijackson@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
"@types/node": "^24.6.0",
|
|
30
30
|
"@typescript/native-preview": "7.0.0-dev.20251125.1",
|
|
31
31
|
"@remix-run/assert": "0.2.0",
|
|
32
|
-
"@remix-run/
|
|
33
|
-
"@remix-run/method-override-middleware": "0.1.
|
|
34
|
-
"@remix-run/
|
|
32
|
+
"@remix-run/fetch-router": "0.19.0",
|
|
33
|
+
"@remix-run/method-override-middleware": "0.1.8",
|
|
34
|
+
"@remix-run/form-data-middleware": "0.3.0",
|
|
35
|
+
"@remix-run/response": "0.3.4",
|
|
35
36
|
"@remix-run/mime": "0.4.1",
|
|
36
|
-
"@remix-run/test": "0.
|
|
37
|
-
"@remix-run/response": "0.3.3"
|
|
37
|
+
"@remix-run/test": "0.4.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@remix-run/fetch-router": "^0.
|
|
40
|
+
"@remix-run/fetch-router": "^0.19.0",
|
|
41
41
|
"@remix-run/html-template": "^0.3.0",
|
|
42
|
-
"@remix-run/
|
|
42
|
+
"@remix-run/mime": "^0.4.1",
|
|
43
43
|
"@remix-run/fs": "^0.4.3",
|
|
44
|
-
"@remix-run/
|
|
44
|
+
"@remix-run/response": "^0.3.4"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"fetch",
|