From cc958326ea42ecd5158bddcafeaca19d6790fc1c Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 7 Jun 2022 20:21:56 -0500 Subject: [PATCH] Use new Hydrogen light-theme asset directly instead of legacy style.css (#13) --- server/routes/install-routes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/routes/install-routes.js b/server/routes/install-routes.js index 3f72711..cef798b 100644 --- a/server/routes/install-routes.js +++ b/server/routes/install-routes.js @@ -71,7 +71,11 @@ function installRoutes(app) { app.get('/hydrogen-styles.css', async function (req, res) { res.set('Content-Type', 'text/css'); - res.sendFile(require.resolve('hydrogen-view-sdk/style.css')); + // We have to disable no-missing-require lint because it doesn't take into + // account `package.json`. `exports`, see + // https://github.com/mysticatea/eslint-plugin-node/issues/255 + // eslint-disable-next-line node/no-missing-require + res.sendFile(require.resolve('hydrogen-view-sdk/assets/theme-element-light.css')); }); // Our own archive app styles