@simplysm/core-common 13.0.95 → 13.0.96
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/docs/features.md +12 -0
- package/package.json +1 -1
package/docs/features.md
CHANGED
|
@@ -329,3 +329,15 @@ import { env } from "@simplysm/core-common";
|
|
|
329
329
|
env.DEV; // boolean -- 개발 모드 여부 (process.env.DEV를 JSON.parse)
|
|
330
330
|
env.VER; // string | undefined -- 버전 문자열 (process.env.VER)
|
|
331
331
|
```
|
|
332
|
+
|
|
333
|
+
### `__DEV__` 글로벌 상수
|
|
334
|
+
|
|
335
|
+
빌드 시점에 치환되는 글로벌 상수. 라이브러리 빌드에서는 치환되지 않고, 클라이언트/서버 빌드에서 `define: { '__DEV__': 'true/false' }`로 치환된다.
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
declare const __DEV__: boolean;
|
|
339
|
+
|
|
340
|
+
if (__DEV__) {
|
|
341
|
+
// 개발 모드 전용 로직
|
|
342
|
+
}
|
|
343
|
+
```
|