From ff41967dbf8a40f0cb49c9a8668c91b27b272811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Alvarez?= Date: Wed, 13 Dec 2023 15:11:08 +0100 Subject: [PATCH] fix(packages/sui-ssr): use custom env variable instead of NODE_ENV to use tmp build folder --- packages/sui-ssr/bin/sui-ssr-dev.js | 1 + packages/sui-ssr/server/utils/factory.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sui-ssr/bin/sui-ssr-dev.js b/packages/sui-ssr/bin/sui-ssr-dev.js index 84edd8e39..daee97fdd 100644 --- a/packages/sui-ssr/bin/sui-ssr-dev.js +++ b/packages/sui-ssr/bin/sui-ssr-dev.js @@ -3,6 +3,7 @@ const {WEBPACK_PORT = 8080} = process.env process.env.CDN = `http://localhost:${WEBPACK_PORT}/` +process.env.DEV_SERVER = 'true' const program = require('commander') const {exec} = require('child_process') diff --git a/packages/sui-ssr/server/utils/factory.js b/packages/sui-ssr/server/utils/factory.js index 1d53e8cd0..8b5586aee 100644 --- a/packages/sui-ssr/server/utils/factory.js +++ b/packages/sui-ssr/server/utils/factory.js @@ -29,7 +29,7 @@ export default ({path, fs, config: ssrConf = {}, assetsManifest}) => { } const publicFolder = req => { - if (process.env.NODE_ENV !== 'production') { + if (process.env.DEV_SERVER === 'true') { return DEFAULT_DEV_PUBLIC_FOLDER }