Skip to content

Commit 0797aac

Browse files
committed
[playground] Decouple playground from compiler
Currently the playground is setup as a linked workspace for the compiler which complicates our yarn workspace setup and means that snap can sometimes pull in a different version of react than was otherwise specified. There's no real reason to have these workspaces combined so let's split them up. ghstack-source-id: 5cb0ccf Pull Request resolved: #31081
1 parent 0b23547 commit 0797aac

File tree

6 files changed

+3499
-2283
lines changed

6 files changed

+3499
-2283
lines changed

.github/workflows/compiler_playground.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
3737
- run: yarn install --frozen-lockfile
3838
- run: npx playwright install --with-deps chromium
39-
- run: yarn workspace playground test
39+
- run: yarn test

compiler/apps/playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"scripts": {
66
"dev": "NODE_ENV=development next dev",
7-
"build": "next build && node ./scripts/downloadFonts.js",
8-
"vercel-build": "yarn workspaces run build",
7+
"build": "./scripts/link-react-compiler-runtime.sh && next build && node ./scripts/downloadFonts.js",
8+
"vercel-build": "yarn build",
99
"start": "next start",
1010
"lint": "next lint",
1111
"test": "playwright test"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
set -eo pipefail
8+
9+
HERE=$(pwd)
10+
11+
cd ../../packages/react-compiler-runtime && yarn --silent link
12+
cd $HERE && yarn --silent link react-compiler-runtime

0 commit comments

Comments
 (0)