mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Dogfood uMC polyfill in playground
This commit is contained in:
@@ -18,6 +18,7 @@ module.exports = function (api) {
|
||||
{
|
||||
compilationMode: "infer",
|
||||
panicThreshold: "NONE",
|
||||
enableUseMemoCachePolyfill: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
@@ -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"],
|
||||
};
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user