GeezerVison is showing github.com — [Flight] Rename the shared entry point (#20420) · react/react@842ee36
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/react/npm/unstable-index.server.js -7Lines changed: 0 additions & 7 deletions Collapse file Copy file name to clipboard +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +'use strict'; | | 2 | + | | 3 | +if (process.env.NODE_ENV === 'production') { | | 4 | + module.exports = require('./cjs/react-unstable-shared-subset.production.min.js'); | | 5 | +} else { | | 6 | + module.exports = require('./cjs/react-unstable-shared-subset.development.js'); | | 7 | +} |
Collapse file Copy file name to clipboardExpand all lines: packages/react/package.json +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 17 | 17 | "umd/", | 18 | 18 | "jsx-runtime.js", | 19 | 19 | "jsx-dev-runtime.js", | 20 | | - "unstable-index.server.js" | | 20 | + "unstable-shared-subset.js" | 21 | 21 | ], | 22 | 22 | "main": "index.js", | 23 | 23 | "exports": { | 24 | 24 | ".": { | 25 | | - "react-server": "./unstable-index.server.js", | | 25 | + "react-server": "./unstable-shared-subset.js", | 26 | 26 | "default": "./index.js" | 27 | 27 | }, | 28 | 28 | "./index": { | 29 | | - "react-server": "./unstable-index.server.js", | | 29 | + "react-server": "./unstable-shared-subset.js", | 30 | 30 | "default": "./index.js" | 31 | 31 | }, | 32 | 32 | "./build-info.json": "./build-info.json", | |
Collapse file Copy file name to clipboard File renamed without changes. Collapse file Copy file name to clipboard File renamed without changes. Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/bundles.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -90,11 +90,11 @@ const bundles = [ | 90 | 90 | externals: [], | 91 | 91 | }, | 92 | 92 |
| 93 | | - /******* Isomorphic Server Only *******/ | | 93 | + /******* Isomorphic Shared Subset *******/ | 94 | 94 | { | 95 | 95 | bundleTypes: [NODE_DEV, NODE_PROD], | 96 | 96 | moduleType: ISOMORPHIC, | 97 | | - entry: 'react/unstable-index.server', | | 97 | + entry: 'react/unstable-shared-subset', | 98 | 98 | global: 'React', | 99 | 99 | externals: [], | 100 | 100 | }, | |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/forks.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,7 +43,7 @@ const forks = Object.freeze({ | 43 | 43 | // happens. Other bundles just require('object-assign') anyway. | 44 | 44 | return null; | 45 | 45 | } | 46 | | - if (entry === 'react' || entry === 'react/unstable-index.server') { | | 46 | + if (entry === 'react' || entry === 'react/unstable-shared-subset') { | 47 | 47 | // Use the forked version that uses ES modules instead of CommonJS. | 48 | 48 | return 'shared/forks/object-assign.inline-umd.js'; | 49 | 49 | } | @@ -64,7 +64,7 @@ const forks = Object.freeze({ | 64 | 64 | // Without this fork, importing `shared/ReactSharedInternals` inside | 65 | 65 | // the `react` package itself would not work due to a cyclical dependency. | 66 | 66 | 'shared/ReactSharedInternals': (bundleType, entry, dependencies) => { | 67 | | - if (entry === 'react' || entry === 'react/unstable-index.server') { | | 67 | + if (entry === 'react' || entry === 'react/unstable-shared-subset') { | 68 | 68 | return 'react/src/ReactSharedInternals.js'; | 69 | 69 | } | 70 | 70 | if (!entry.startsWith('react/') && dependencies.indexOf('react') === -1) { | |
|