oasis-chat 0.1.1 → 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 +21 -0
- package/dist/index.cjs.js +1 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +77 -105
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -29
- package/dist/index.umd.js.map +1 -1
- package/dist/react/index.cjs.js +1 -29
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.es.js +64 -92
- package/dist/react/index.es.js.map +1 -1
- package/dist/sw.js +30 -0
- package/dist/vue/index.cjs.js +1 -29
- package/dist/vue/index.cjs.js.map +1 -1
- package/dist/vue/index.es.js +78 -106
- package/dist/vue/index.es.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -8,6 +8,27 @@
|
|
|
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
|
|
|
13
34
|
> **참고**: 이 라이브러리는 Service Worker를 통해 자동으로 CORS 문제를 해결합니다. 별도의 프록시 설정이 필요하지 않습니다.
|