From dc28fe12c428b80fc95386530f1f212227968c64 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Sat, 13 Apr 2019 02:44:28 -0700 Subject: [PATCH 1/4] Prevent the use of react-native internals in web. --- packages/react-scripts/config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index a41d60e69bc..52fe15d4ea3 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -284,7 +284,7 @@ module.exports = function(webpackEnv) { alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ - 'react-native': 'react-native-web', + 'react-native$': 'react-native-web', }, plugins: [ // Adds support for installing with Plug'n'Play, leading to faster installs and adding From f4ef3fc56578be9376886c03727ffb31ef8586db Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Tue, 16 Apr 2019 14:45:28 -0700 Subject: [PATCH 2/4] Added ^ to perform exact match. --- packages/react-scripts/config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 52fe15d4ea3..3aec9e0e0de 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -284,7 +284,7 @@ module.exports = function(webpackEnv) { alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ - 'react-native$': 'react-native-web', + '^react-native$': 'react-native-web', }, plugins: [ // Adds support for installing with Plug'n'Play, leading to faster installs and adding From 870aba8b8b32f1b8ac22c234e72d672f254984c3 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Tue, 16 Apr 2019 15:27:54 -0700 Subject: [PATCH 3/4] Removed unsupported `^` from alias matcher --- packages/react-scripts/config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 3aec9e0e0de..52fe15d4ea3 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -284,7 +284,7 @@ module.exports = function(webpackEnv) { alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ - '^react-native$': 'react-native-web', + 'react-native$': 'react-native-web', }, plugins: [ // Adds support for installing with Plug'n'Play, leading to faster installs and adding From 5398528fc2f7e0d2c6d37b2bdd9a407dda4d7686 Mon Sep 17 00:00:00 2001 From: Evan Bacon Date: Mon, 16 Nov 2020 21:17:34 +0100 Subject: [PATCH 4/4] revert changes --- CHANGELOG-1.x.md | 4 +++- CHANGELOG-2.x.md | 8 +++---- README.md | 2 +- docusaurus/docs/loading-graphql-files.md | 2 +- .../proxying-api-requests-in-development.md | 4 ++-- docusaurus/website/src/pages/index.js | 5 +++- .../getTemplateInstallPackage.test.js | 24 +++++++++---------- packages/react-dev-utils/README.md | 4 ++-- .../features/webpack/assets/scss-styles.scss | 16 ++++++------- packages/react-scripts/lib/react-app.d.ts | 10 ++++---- .../scripts/utils/verifyTypeScriptSetup.js | 4 +--- test/fixtures/__shared__/util/scripts.js | 9 ++++++- .../src/index.scss | 6 ++--- test/fixtures/typescript-advanced/src/App.tsx | 8 +++---- test/fixtures/typescript/src/App.ts | 2 +- 15 files changed, 59 insertions(+), 49 deletions(-) diff --git a/CHANGELOG-1.x.md b/CHANGELOG-1.x.md index 21eab4b2618..d8b8ee9cb90 100644 --- a/CHANGELOG-1.x.md +++ b/CHANGELOG-1.x.md @@ -1588,7 +1588,9 @@ After the regular update procedure above, add these line to `` in `public/ Add `