Skip to content

Commit ab7cf94

Browse files
committed
add support for react-native-svg-web
1 parent 0b1d636 commit ab7cf94

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

packages/react-scripts/config/webpack.config.dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ module.exports = {
104104
// Support React Native Web
105105
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
106106
'react-native': 'react-native-web',
107+
'react-native-svg': 'react-native-svg-web',
107108
},
108109
plugins: [
109110
// Prevents users from importing files from outside of src/ (or node_modules/).

packages/react-scripts/config/webpack.config.prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ module.exports = {
110110
// Support React Native Web
111111
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
112112
'react-native': 'react-native-web',
113+
'react-native-svg': 'react-native-svg-web',
113114
},
114115
plugins: [
115116
// Prevents users from importing files from outside of src/ (or node_modules/).

packages/react-scripts/scripts/utils/createJestConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
4242
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'],
4343
moduleNameMapper: {
4444
'^react-native$': 'react-native-web',
45+
'^react-native-svg$': 'react-native-svg-web',
4546
},
4647
moduleFileExtensions: [
4748
'web.js',

0 commit comments

Comments
 (0)