Skip to content

Commit

Permalink
Revert "Don't try to start the api server unless RSC is enabled (#10275
Browse files Browse the repository at this point in the history
…)"

This reverts commit 27802cf.
  • Loading branch information
thedavidprice committed Mar 27, 2024
1 parent 4f5156e commit 544d580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .changesets/10275.md

This file was deleted.

7 changes: 3 additions & 4 deletions packages/cli/src/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const builder = async (yargs) => {

// serve both
if (positionalArgs.length === 1) {
if (!apiSideExists && !getConfig().experimental?.rsc?.enabled) {
if (!apiSideExists) {
console.error(
c.error(
'\n Unable to serve the both sides as no `api` folder exists. Please use `yarn rw serve web` instead. \n',
Expand All @@ -129,10 +129,9 @@ export const builder = async (yargs) => {
process.exit(1)
}

// We need the web side (and api side, if it exists) to have been built
// We need the web side to have been built
if (
(fs.existsSync(path.join(getPaths().api.base)) &&
!fs.existsSync(path.join(getPaths().api.dist))) ||
!fs.existsSync(path.join(getPaths().api.dist)) ||
!fs.existsSync(path.join(getPaths().web.dist), 'index.html')
) {
console.error(
Expand Down

0 comments on commit 544d580

Please sign in to comment.