Skip to content

Commit bf45f08

Browse files
yzhe554meeroslav
andauthored
feat(expo): support cjs and mjs (#21408)
Co-authored-by: Miroslav Jonaš <missing.manual@gmail.com>
1 parent 17d0588 commit bf45f08

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/expo/src/generators/application/files/metro.config.js.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const customConfig = {
1717
},
1818
resolver: {
1919
assetExts: assetExts.filter((ext) => ext !== 'svg'),
20-
sourceExts: [...sourceExts, 'svg'],
20+
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
2121
},
2222
};
2323

packages/expo/src/migrations/update-16-6-0/update-metro-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const customConfig = {
5252
},
5353
resolver: {
5454
assetExts: assetExts.filter((ext) => ext !== 'svg'),
55-
sourceExts: [...sourceExts, 'svg'],
55+
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
5656
},
5757
};
5858

packages/react-native/src/generators/application/files/app/metro.config.js.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const customConfig = {
1616
},
1717
resolver: {
1818
assetExts: assetExts.filter((ext) => ext !== 'svg'),
19-
sourceExts: [...sourceExts, 'svg'],
19+
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
2020
},
2121
};
2222

packages/react-native/src/migrations/update-16-6-0/update-metro-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const customConfig = {
5151
},
5252
resolver: {
5353
assetExts: assetExts.filter((ext) => ext !== 'svg'),
54-
sourceExts: [...sourceExts, 'svg'],
54+
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
5555
},
5656
};
5757

0 commit comments

Comments
 (0)