-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix/#38 JS SDK가 브라우저에서 동작하지 않는 이슈 #39
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,13 @@ module.exports = (env, argv) => { | |
output: { | ||
filename: isProduction ? 'sdk.min.js' : 'sdk.js', | ||
path: path.resolve(__dirname, 'dist'), | ||
library: 'LogBat', | ||
libraryTarget: 'umd', | ||
globalObject: 'this' | ||
library: { | ||
name: 'LogBat', | ||
type: 'umd', | ||
export: 'default' | ||
}, | ||
globalObject: 'this', | ||
umdNamedDefine: true | ||
}, | ||
devtool: isProduction ? 'source-map' : 'eval-source-map', | ||
mode: isProduction ? 'production' : 'development', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드 패치를 검토해보면 다음과 같은 개선 사항 및 버그 리스크를 제안할 수 있습니다:
종합적으로 보았을 때, 긍정적인 방향으로 변화하고 있으며, 몇 가지 세부 사항을 조정하면 더욱 안정적이고 효율적인 코드가 될 것입니다. |
||
|
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.
코드 패치를 검토한 결과는 다음과 같습니다:
버그 위험:
apiEndpoint
변경이 기존 API와의 호환성을 깨뜨릴 수 있습니다. 이전 엔드포인트를 사용하는 코드가 있을 경우, 이로 인해 요청이 실패할 수 있습니다. 변경에 대한 문서화가 필요합니다.개선 제안:
apiEndpoint
를 클래스 내부의 상수로 선언하는 것이 좋습니다. 타입을 명시함으로써 향후 코드 유지보수가 용이해집니다.window as any
대신 안전한 방식으로 객체 속성을 확장하는 것이 좋습니다. 이를 위해 적절한 타입 정의를 통해 TypeScript의 타입 안전을 활용할 수 있습니다.형식 개선:
결과적으로, 변경 사항은 유익하지만 기존 시스템과의 연결성을 유지하도록 주의해야 하며, 코드 가독성을 높일 수 있는 여지가 있습니다.