Skip to content

Commit c0446d8

Browse files
committed
[#11] chore: SVG 환경 세팅
1 parent 773740f commit c0446d8

File tree

6 files changed

+591
-20
lines changed

6 files changed

+591
-20
lines changed

declarations.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare module "*.svg" {
2+
import { SvgProps } from "react-native-svg";
3+
const content: React.FC<SvgProps>;
4+
export default content;
5+
}

ios/Podfile.lock

+7-1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ PODS:
333333
- RNScreens (3.8.0):
334334
- React-Core
335335
- React-RCTImage
336+
- RNSVG (12.1.1):
337+
- React
336338
- Yoga (1.14.0)
337339

338340
DEPENDENCIES:
@@ -383,6 +385,7 @@ DEPENDENCIES:
383385
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
384386
- RNReanimated (from `../node_modules/react-native-reanimated`)
385387
- RNScreens (from `../node_modules/react-native-screens`)
388+
- RNSVG (from `../node_modules/react-native-svg`)
386389
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
387390

388391
SPEC REPOS:
@@ -480,6 +483,8 @@ EXTERNAL SOURCES:
480483
:path: "../node_modules/react-native-reanimated"
481484
RNScreens:
482485
:path: "../node_modules/react-native-screens"
486+
RNSVG:
487+
:path: "../node_modules/react-native-svg"
483488
Yoga:
484489
:path: "../node_modules/react-native/ReactCommon/yoga"
485490

@@ -501,7 +506,7 @@ SPEC CHECKSUMS:
501506
EXUpdates: 061b67c33f0e7f8fd335bbb48697c4a4fc8a5157
502507
EXUpdatesInterface: e1c01b4f5ec76bd1d6cc714938f9edf5ef6379b9
503508
FBLazyVector: c71c5917ec0ad2de41d5d06a5855f6d5eda06971
504-
FBReactNativeSpec: 59cd42b527c2626408fa5538e2d36d840c77e0ec
509+
FBReactNativeSpec: 3b304bde59db01cca21677bb69d23a0215b141da
505510
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
506511
RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c
507512
RCTRequired: d34bf57e17cb6e3b2681f4809b13843c021feb6c
@@ -530,6 +535,7 @@ SPEC CHECKSUMS:
530535
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
531536
RNReanimated: 024eff8202342abf4b24e11575a16afc441dabfe
532537
RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c
538+
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
533539
Yoga: e6ecf3fa25af9d4c87e94ad7d5d292eedef49749
534540

535541
PODFILE CHECKSUM: 47b8eda49859f102b3f066d23a7b68843b55644f

ios/pivotingclient.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@
377377
COPY_PHASE_STRIP = NO;
378378
ENABLE_STRICT_OBJC_MSGSEND = YES;
379379
ENABLE_TESTABILITY = YES;
380-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
380+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
381381
GCC_C_LANGUAGE_STANDARD = gnu99;
382382
GCC_DYNAMIC_NO_PIC = NO;
383383
GCC_NO_COMMON_BLOCKS = YES;
@@ -434,7 +434,7 @@
434434
COPY_PHASE_STRIP = YES;
435435
ENABLE_NS_ASSERTIONS = NO;
436436
ENABLE_STRICT_OBJC_MSGSEND = YES;
437-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
437+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
438438
GCC_C_LANGUAGE_STANDARD = gnu99;
439439
GCC_NO_COMMON_BLOCKS = YES;
440440
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

metro.config.js

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
// Learn more https://docs.expo.io/guides/customizing-metro
2-
const { getDefaultConfig } = require('expo/metro-config');
1+
// Reference : https://github.com/kristerkari/react-native-svg-transformer
32

4-
module.exports = getDefaultConfig(__dirname);
3+
const { getDefaultConfig } = require("expo/metro-config");
4+
5+
module.exports = (async () => {
6+
const {
7+
resolver: { sourceExts, assetExts },
8+
} = await getDefaultConfig(__dirname);
9+
return {
10+
transformer: {
11+
babelTransformerPath: require.resolve("react-native-svg-transformer"),
12+
},
13+
resolver: {
14+
assetExts: assetExts.filter((ext) => ext !== "svg"),
15+
sourceExts: [...sourceExts, "svg"],
16+
},
17+
};
18+
})();

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"react-native-reanimated": "~2.2.0",
2222
"react-native-safe-area-context": "3.3.2",
2323
"react-native-screens": "~3.8.0",
24+
"react-native-svg": "^12.1.1",
2425
"react-native-web": "0.17.1",
2526
"styled-components": "^5.3.3"
2627
},
@@ -30,6 +31,7 @@
3031
"@types/react": "^17.0.35",
3132
"@types/react-native": "^0.66.4",
3233
"@types/react-test-renderer": "^17.0.1",
34+
"react-native-svg-transformer": "^0.14.3",
3335
"typescript": "^4.4.4"
3436
},
3537
"private": true

0 commit comments

Comments
 (0)