oasis-chat 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,8 +8,31 @@
8
8
  npm install oasis-chat
9
9
  ```
10
10
 
11
+ ## Service Worker 설정
12
+
13
+ 이 라이브러리는 Service Worker를 통해 자동으로 CORS 문제를 해결합니다. Service Worker를 사용하려면 다음 단계를 따라주세요:
14
+
15
+ 1. Service Worker 파일을 프로젝트의 public 폴더(또는 정적 파일 디렉토리)에 복사합니다:
16
+
17
+ ```bash
18
+ # Next.js, Create React App 등의 경우
19
+ cp node_modules/oasis-chat/dist/sw.js public/sw.js
20
+
21
+ # Vite 프로젝트의 경우
22
+ cp node_modules/oasis-chat/dist/sw.js public/sw.js
23
+
24
+ # 일반 정적 서버의 경우
25
+ cp node_modules/oasis-chat/dist/sw.js ./sw.js
26
+ ```
27
+
28
+ 2. Service Worker 파일이 루트 경로(`/sw.js`)에서 접근 가능한지 확인하세요.
29
+
30
+ > **참고**: Service Worker 파일은 반드시 실제 HTTP/HTTPS URL에서 서빙되어야 합니다. blob URL이나 data URL은 지원되지 않습니다.
31
+
11
32
  ## 사용 예시
12
33
 
34
+ > **참고**: 이 라이브러리는 Service Worker를 통해 자동으로 CORS 문제를 해결합니다. 별도의 프록시 설정이 필요하지 않습니다.
35
+
13
36
  ### React
14
37
 
15
38
  React 프로젝트에서 사용할 때는 wrapper 컴포넌트를 사용하면 CSS를 별도로 import할 필요가 없습니다.