diff --git a/.eslintignore b/.eslintignore index 90390fd797..2d04417b21 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,7 +3,8 @@ lib/node_modules web/dist web/flow-typed web/node_modules -server/compiled +server/app_compiled +server/landing_compiled server/dist server/secrets server/facts diff --git a/.prettierignore b/.prettierignore index 4fe87f4b5d..129f0b86d4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,8 @@ lib/flow-typed web/dist web/flow-typed -server/compiled +server/app_compiled +server/landing_compiled server/dist server/secrets server/facts diff --git a/server/compiled b/server/app_compiled similarity index 100% rename from server/compiled rename to server/app_compiled diff --git a/server/landing_compiled b/server/landing_compiled new file mode 120000 index 0000000000..7c811cd8a8 --- /dev/null +++ b/server/landing_compiled @@ -0,0 +1 @@ +../landing/dist/ \ No newline at end of file diff --git a/server/src/responders/website-responders.js b/server/src/responders/website-responders.js index 5397603bbb..41f368bbf7 100644 --- a/server/src/responders/website-responders.js +++ b/server/src/responders/website-responders.js @@ -77,8 +77,8 @@ async function getAssetInfo() { }; return assetInfo; } - // $FlowFixMe compiled/assets.json doesn't always exist - const { default: assets } = await import('../../compiled/assets'); + // $FlowFixMe app_compiled/assets.json doesn't always exist + const { default: assets } = await import('../../app_compiled/assets'); assetInfo = { jsURL: `compiled/${assets.browser.js}`, fontsURL: googleFontsURL, diff --git a/server/src/server.js b/server/src/server.js index 1a4afa4146..a6a845327a 100644 --- a/server/src/server.js +++ b/server/src/server.js @@ -58,7 +58,14 @@ if (cluster.isMaster) { process.env.NODE_ENV === 'dev' ? undefined : { maxAge: '1y', immutable: true }; - router.use('/compiled', express.static('compiled', compiledFolderOptions)); + router.use( + '/compiled', + express.static('app_compiled', compiledFolderOptions), + ); + router.use( + '/commlanding/compiled', + express.static('landing_compiled', compiledFolderOptions), + ); router.use('/', express.static('icons')); for (const endpoint in jsonEndpoints) {