-
Notifications
You must be signed in to change notification settings - Fork 0
feat/js bundle 참조 위치를 cdn 경로로 변경 #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ios
Are you sure you want to change the base?
Conversation
package.json
Outdated
"bundle:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output dist/android/index.android.bundle --assets-dest dist/android/assets", | ||
"bundle:ios": "react-native bundle --platform ios --dev false --entry-file index.js --bundle-output dist/ios/index.ios.bundle --assets-dest dist/ios/assets", | ||
"bundle": "yarn bundle:android && yarn bundle:ios" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추후 js 코드 변경 시 -> yarn bundle 명령어 실행 -> dist 폴더에 추출된 js bundle 파일과 assets 를 CDN 에 업로드하는 방식입니다.
// return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; | ||
// Code Push via CDN | ||
return [NSURL URLWithString:@"https://ip-file-upload-test.s3.ap-northeast-2.amazonaws.com/naeilmorae-bundle/index.ios.bundle"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ios 에서 외부 js bundle 파일을 참조하게 했습니다.
// Code Push via CDN | ||
override fun getJSBundleFile(): String? { | ||
return if (BuildConfig.DEBUG) { | ||
// 디버그 모드일 때는 null 반환해서 Metro 서버 연결 | ||
null | ||
} else { | ||
// 릴리즈 모드일 때는 CDN 번들 사용 | ||
"https://ip-file-upload-test.s3.ap-northeast-2.amazonaws.com/naeilmorae-bundle/index.android.bundle" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안드로이드에서 외부 js bundle 파일을 참조하게 했습니다.
작업 분류
요구사항
작업 내용
트러블슈팅
TODO
테스트