환경별 Remote URL 매핑, 조건문보다 명시적 매핑이 낫다 (안그러면 버그위험 up) #415
milooy
started this conversation in
Today I Learned
Replies: 2 comments
-
|
보통 env 파일로 관리할 것 같은데 위와 같이 사용해아하는 경우도 있군요?! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
완전 공감합니다 저도 삼항 연산자로 떼우려다가 버그를 맞이했던 경험이 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
서비스에서
remoteEntry.js를 불러올 때,환경에 따라 다른 URL을 바라보도록 설정해두었다.
처음에는 이렇게 짰다
하지만 버그발생 띠용
알고보니 'preview'라는 ENV가 있는데, 여기서도 alpha Entry를 보여줘야 했던거임.
그래서 이렇게 고쳐보았다
특별취급 대상을 live로 바꾼거지.
다만... 주석으로 의도를 남겼지만
처음에 짠 코드와 동일하게 잠정적 버그의 여지가 있어부려
최종적으로는 명시적 매핑으로 고쳤다
배운 점
Beta Was this translation helpful? Give feedback.
All reactions