vite-plugin-serve-static 1.0.0 → 1.0.2
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/LICENSE +1 -1
- package/dist/index.js +3 -3
- package/package.json +7 -4
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var middleware = (config) => {
|
|
|
21
21
|
const type = contentType(path.basename(filePath));
|
|
22
22
|
res.writeHead(200, {
|
|
23
23
|
"Content-Length": stats.size,
|
|
24
|
-
"Content-Type": type
|
|
24
|
+
"Content-Type": type || void 0
|
|
25
25
|
});
|
|
26
26
|
const stream = fs.createReadStream(filePath);
|
|
27
27
|
stream.pipe(res);
|
|
@@ -38,10 +38,10 @@ function serveStatic(config) {
|
|
|
38
38
|
return {
|
|
39
39
|
name: "serve-static",
|
|
40
40
|
configureServer(server) {
|
|
41
|
-
server.middlewares.use(middleware_default(config));
|
|
41
|
+
return () => server.middlewares.use(middleware_default(config));
|
|
42
42
|
},
|
|
43
43
|
configurePreviewServer(server) {
|
|
44
|
-
server.middlewares.use(middleware_default(config));
|
|
44
|
+
return () => server.middlewares.use(middleware_default(config));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-serve-static",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A Vite plugin for serving static files during local development",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"homepage": "https://github.com/reifiedbeans/vite-plugin-serve-static",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"vite-plugin"
|
|
13
|
+
],
|
|
11
14
|
"type": "module",
|
|
12
15
|
"files": [
|
|
13
16
|
"dist"
|
|
@@ -31,12 +34,12 @@
|
|
|
31
34
|
"mime-types": "^2.1.35"
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
|
-
"@sensible-ts/semantic-release": "^
|
|
37
|
+
"@sensible-ts/semantic-release": "^2.0.0",
|
|
35
38
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
36
39
|
"@types/mime-types": "^2.1.4",
|
|
37
40
|
"@types/node": "^20.10.5",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
39
|
-
"@typescript-eslint/parser": "^
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
42
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
40
43
|
"eslint": "^8.56.0",
|
|
41
44
|
"eslint-config-prettier": "^9.1.0",
|
|
42
45
|
"npm-run-all": "^4.1.5",
|