From f2f6fd9b37b377a83a60948db7a522852eca0c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Alvarez?= Date: Wed, 13 Dec 2023 12:16:14 +0100 Subject: [PATCH] feat(packages/sui-ssr): create ssr tmp folder --- packages/sui-ssr/bin/sui-ssr-dev.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/sui-ssr/bin/sui-ssr-dev.js b/packages/sui-ssr/bin/sui-ssr-dev.js index 8c23b934f..84edd8e39 100644 --- a/packages/sui-ssr/bin/sui-ssr-dev.js +++ b/packages/sui-ssr/bin/sui-ssr-dev.js @@ -18,9 +18,10 @@ const linkLoaderConfigBuilder = require('@s-ui/bundler/loaders/linkLoaderConfigB const serverConfigFactory = require('../compiler/server.js') -const SERVER_OUTPUT_PATH = path.join(process.cwd(), '.sui/server') -const STATICS_OUTPUT_PATH = path.join(process.cwd(), '.sui/statics') +const TMP_PATH = '.sui' +const SERVER_OUTPUT_PATH = path.join(process.cwd(), `${TMP_PATH}/server`) const STATICS_PATH = path.join(process.cwd(), './statics') +const STATICS_OUTPUT_PATH = path.join(process.cwd(), `${TMP_PATH}/statics`) program .option('-L, --link-all [monorepo]', 'Link all packages inside of monorepo multipackage') @@ -124,6 +125,10 @@ const start = ({packagesToLink, linkAll}) => { } }) + if (!fs.existsSync(TMP_PATH)) { + fs.mkdirSync(TMP_PATH) + } + Promise.all([linkStatics(), initMSW(), compile('client', clientCompiler), compile('server', serverCompiler)]) .then(() => { const script = nodemon({