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 }