Skip to content

Commit

Permalink
feat(packages/sui-ssr): create ssr tmp folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Alvarez authored and Andrés Alvarez committed Dec 13, 2023
1 parent 219685c commit f2f6fd9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/sui-ssr/bin/sui-ssr-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit f2f6fd9

Please sign in to comment.