Dogfood uMC polyfill in playground

This commit is contained in:
Lauren Tan
2024-04-03 18:12:29 -04:00
parent f33e63838d
commit ee24e3fc16
5 changed files with 16 additions and 7 deletions
+1
View File
@@ -18,6 +18,7 @@ module.exports = function (api) {
{
compilationMode: "infer",
panicThreshold: "NONE",
enableUseMemoCachePolyfill: true,
},
],
],
+11 -5
View File
@@ -6,6 +6,7 @@
*/
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const path = require("path");
const nextConfig = {
reactStrictMode: true,
@@ -25,13 +26,18 @@ const nextConfig = {
}),
);
}
config.resolve.alias = {
...config.resolve.alias,
"react-forget-runtime": path.resolve(
__dirname,
"../../packages/react-forget-runtime",
),
};
return config;
},
// These aren't used by the playground, but turning it on forces nextjs to use
// experimental react which has the useMemoCache hook.
experimental: {
serverActions: true,
},
transpilePackages: ["monaco-editor"],
};
+2 -1
View File
@@ -32,7 +32,8 @@
"prettier": "3.0.3",
"pretty-format": "^29.3.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"react-forget-runtime": "*"
},
"devDependencies": {
"@types/node": "18.11.9",
+1 -1
View File
@@ -22,7 +22,7 @@
"start": "yarn workspace playground run start",
"next": "yarn workspace playground run dev",
"build": "yarn workspaces run build",
"dev": "concurrently --kill-others -n compiler,playground \"yarn workspace babel-plugin-react-forget run build --watch\" \"yarn workspace playground run dev\"",
"dev": "concurrently --kill-others -n compiler,runtime,playground \"yarn workspace babel-plugin-react-forget run build --watch\" \"yarn workspace react-forget-runtime run build --watch\" \"yarn workspace playground run dev\"",
"test": "yarn workspaces run test",
"snap": "yarn workspace babel-plugin-react-forget run snap",
"snap:build": "yarn workspace snap run build"
@@ -3,6 +3,7 @@
"version": "0.0.1",
"description": "Runtime for React Forget",
"license": "MIT",
"main": "dist/index.js",
"files": [
"src"
],