diff options
Diffstat (limited to 'src/web-routes.js')
-rw-r--r-- | src/web-routes.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/web-routes.js b/src/web-routes.js index 762b26c3..a7115bbd 100644 --- a/src/web-routes.js +++ b/src/web-routes.js @@ -1,11 +1,13 @@ -import {readdir} from 'node:fs/promises'; +import {readdir, stat} from 'node:fs/promises'; import * as path from 'node:path'; import {fileURLToPath} from 'node:url'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); +/* eslint-disable no-unused-vars */ const codeSrcPath = __dirname; const codeRootPath = path.resolve(codeSrcPath, '..'); +/* eslint-enable no-unused-vars */ function getNodeDependencyRootPath(dependencyName) { return ( @@ -34,7 +36,7 @@ export const stationaryCodeRoutes = [ }, { - from: path.join(codeSrcPath, 'util'), + from: path.join(codeSrcPath, 'common-util'), to: ['staticSharedUtil.root'], statically: 'copy', }, @@ -106,6 +108,21 @@ export async function identifyDynamicWebRoutes({ ]), () => { + const from = + path.resolve(path.join(mediaPath, 'favicon.ico')); + + return stat(from).then( + // {statically: 'copy'} is not workable for individual files + // at the moment, so this remains a symlink. + () => [{ + from, + to: ['shared.path', 'favicon.ico'], + statically: 'symlink', + }], + () => []); + }, + + () => { if (!wikiCachePath) return []; const from = |