From 084adda13f22d73ba48954db2c282e681f1a173f Mon Sep 17 00:00:00 2001 From: Sanjeeb Lama <51410633+SanjeebLama@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:09:02 +0545 Subject: [PATCH] Add preview links --- apps/docs/lighthouserc.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/docs/lighthouserc.js b/apps/docs/lighthouserc.js index 4ac326f..830bd0b 100644 --- a/apps/docs/lighthouserc.js +++ b/apps/docs/lighthouserc.js @@ -1,8 +1,13 @@ module.exports = { ci: { collect: { - url: 'http://localhost:3001', - startServerCommand: 'yarn run dev', + // Use this for Prod / dev + url: [ + `https://${process.env.PREVIEW_URL}`, + ], + // url: 'http://localhost:3001', + startServerCommand: + process.env.NODE_ENV === 'production' ? undefined : 'npm run start', }, assert: { preset: 'lighthouse:no-pwa', @@ -12,4 +17,3 @@ module.exports = { }, }, }; -