Skip to content

Commit 7c032ee

Browse files
authored
Remove runtime alias hack (facebook#5142)
* Remove runtime alias hack * Pass absolute path to preset * Change comment * Give a relative path to absolute runtime * Clean up config * Tweak again * Make absolute runtime the default * Remove runtime package from error overlay
1 parent 34ff052 commit 7c032ee

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

config/webpack.config.dev.js

-9
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,6 @@ module.exports = {
144144
// for React Native Web.
145145
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],
146146
alias: {
147-
// @remove-on-eject-begin
148-
// Resolve Babel runtime relative to react-scripts.
149-
// It usually still works on npm 3 without this but it would be
150-
// unfortunate to rely on, as react-scripts could be symlinked,
151-
// and thus @babel/runtime might not be resolvable from the source.
152-
'@babel/runtime': path.dirname(
153-
require.resolve('@babel/runtime/package.json')
154-
),
155-
// @remove-on-eject-end
156147
// Support React Native Web
157148
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
158149
'react-native': 'react-native-web',

config/webpack.config.prod.js

-9
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,6 @@ module.exports = {
199199
// for React Native Web.
200200
extensions: ['.web.js', '.js', '.json', '.web.jsx', '.jsx'],
201201
alias: {
202-
// @remove-on-eject-begin
203-
// Resolve Babel runtime relative to react-scripts.
204-
// It usually still works on npm 3 without this but it would be
205-
// unfortunate to rely on, as react-scripts could be symlinked,
206-
// and thus @babel/runtime might not be resolvable from the source.
207-
'@babel/runtime': path.dirname(
208-
require.resolve('@babel/runtime/package.json')
209-
),
210-
// @remove-on-eject-end
211202
// Support React Native Web
212203
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
213204
'react-native': 'react-native-web',

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"dependencies": {
2424
"@babel/core": "7.1.0",
25-
"@babel/runtime": "7.0.0",
2625
"@svgr/webpack": "2.4.1",
2726
"babel-core": "7.0.0-bridge.0",
2827
"babel-eslint": "9.0.0",

0 commit comments

Comments
 (0)