diff --git a/package-lock.json b/package-lock.json index bff7a9e6..e048b86e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -346,6 +346,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -449,6 +450,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -471,6 +473,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -1978,6 +1981,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", @@ -3780,6 +3784,7 @@ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", "license": "MIT", + "peer": true, "bin": { "jiti": "bin/jiti.js" } @@ -4691,6 +4696,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -4956,6 +4962,7 @@ "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.7.tgz", "integrity": "sha512-7Hc+IvlQ7hlaIfQFZnxlRl0jnpWq2qwibORBhQYIb0QbNtuicc5ZxvKkVT71HJ4Py1wSZ/3VR1r8LfkCtoCzhw==", "license": "MIT", + "peer": true, "dependencies": { "posthtml-parser": "^0.11.0", "posthtml-render": "^3.0.0" @@ -6639,6 +6646,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -6833,6 +6841,7 @@ "integrity": "sha512-uzcxnSDVjAopEUjljkWh8EIrg6tlzrjFUfMcR1EVsRDGwf/ccef0qQPRyOrROwhrTDaApueq+ja+KLPlzR/zdg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -6949,6 +6958,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -6962,6 +6972,7 @@ "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/expect": "3.2.4", diff --git a/src/server/index.js b/src/server/index.js index 59739cc8..0d7e94b6 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -258,7 +258,9 @@ export default async (config = {}) => { staticFiles = [staticFiles] } - const staticFilesSourcePaths = staticFiles.flatMap((definition) => definition.source) + const staticFilesSourcePaths = staticFiles + .flatMap((definition) => definition.source) + .filter(p => typeof p === 'string') /** * Global watcher @@ -273,7 +275,7 @@ export default async (config = {}) => { '**/*.css', ...staticFilesSourcePaths, ...get(config, 'server.watch', []), - ]) + ].filter(p => typeof p === 'string')) async function globalPathsHandler(file, eventType) { // Update express.static to serve new files