From 874203c03c627ca1d501ab102d0a452e7b827c56 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 18 Jun 2024 22:52:12 -0300 Subject: web-routes, write: static-build: statically copy some routes --- src/web-routes.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/web-routes.js') diff --git a/src/web-routes.js b/src/web-routes.js index 7e08d06f..762b26c3 100644 --- a/src/web-routes.js +++ b/src/web-routes.js @@ -18,21 +18,25 @@ export const stationaryCodeRoutes = [ { from: path.join(codeSrcPath, 'static', 'css'), to: ['staticCSS.root'], + statically: 'copy', }, { from: path.join(codeSrcPath, 'static', 'js'), to: ['staticJS.root'], + statically: 'copy', }, { from: path.join(codeSrcPath, 'static', 'misc'), to: ['staticMisc.root'], + statically: 'copy', }, { from: path.join(codeSrcPath, 'util'), to: ['staticSharedUtil.root'], + statically: 'copy', }, ]; @@ -50,6 +54,8 @@ function quickNodeDependency({ : root), to: ['staticLib.path', name], + + statically: 'copy', }, ]; } @@ -86,8 +92,17 @@ export async function identifyDynamicWebRoutes({ }) { const routeFunctions = [ () => Promise.resolve([ - {from: path.resolve(mediaPath), to: ['media.root']}, - {from: path.resolve(mediaCachePath), to: ['thumb.root']}, + { + from: path.resolve(mediaPath), + to: ['media.root'], + statically: 'symlink', + }, + + { + from: path.resolve(mediaCachePath), + to: ['thumb.root'], + statically: 'symlink', + }, ]), () => { @@ -98,7 +113,12 @@ export async function identifyDynamicWebRoutes({ return ( readdir(from).then( - () => [{from, to: ['searchData.root']}], + () => [ + { + from, + to: ['searchData.root'], + statically: 'copy', + }], () => [])); }, ]; -- cgit 1.3.0-6-gf8a5