You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`astro dev` 명령을 실행하면 어댑터는 여러 Netlify 플랫폼 기능을 활성화하여 환경을 프로덕션과 최대한 일치하도록 가깝게 만듭니다. 여기에는 다음이 포함됩니다.
334
+
335
+
- 로컬 [Netlify Image CDN](https://docs.netlify.com/build/image-cdn/overview/) 서버. 기본적으로 [이미지](#netlify-이미지-cdn-지원)에 사용됩니다.
336
+
- 로컬 [Netlify Blobs](https://docs.netlify.com/build/data-and-storage/netlify-blobs/) 서버. 기본적으로 [세션](#세션)에 사용됩니다.
337
+
- Netlify 구성의 [리디렉션, URL 재작성 (Rewrites)](https://docs.netlify.com/manage/routing/redirects/overview/) 및 [헤더](https://docs.netlify.com/manage/routing/headers/)
338
+
- 요청 시 렌더링되는 페이지에서 [Netlify Edge Context](#사이트에서-에지-컨텍스트에-액세스하기)에 액세스
339
+
- Netlify 사이트의 [환경 변수](https://docs.netlify.com/build/environment-variables/overview/)
340
+
341
+
로컬 사이트가 `netlify link`를 사용하여 [Netlify 사이트에 연결](https://docs.netlify.com/api-and-cli-guides/cli-guides/get-started-with-cli/#link-and-unlink-sites)되어 있을 때 가장 잘 작동합니다.
342
+
343
+
어댑터 구성에서 [`devFeatures`](#devfeatures) 옵션을 사용하여 이러한 기능 중 일부를 활성화 또는 비활성화할 수 있습니다. 기본적으로 환경 변수를 제외한 모든 기능이 활성화되어 있습니다.
`devFeatures` 옵션은 모든 기능을 활성화 또는 비활성화하는 부울이거나 특정 기능을 활성화하는 객체일 수 있습니다.
354
+
355
+
```js title="astro.config.mjs" ins={7-12}
356
+
import { defineConfig } from'astro/config';
357
+
importnetlifyfrom'@astrojs/netlify';
358
+
359
+
exportdefaultdefineConfig({
360
+
// ...
361
+
adapter:netlify({
362
+
devFeatures: {
363
+
// 개발 모드에서 Netlify Image CDN 지원을 활성화합니다. 기본값은 true입니다.
364
+
images:false,
365
+
// 개발 모드에서 Netlify 환경 변수를 주입합니다. 기본값은 false입니다.
366
+
environmentVariables:true,
367
+
},
368
+
}),
369
+
});
370
+
```
371
+
372
+
##### `devFeatures.images`
373
+
374
+
<p>
375
+
**타입:**`boolean`<br />
376
+
**기본값:**`true`<br />
377
+
<Sincev="6.5.1"pkg="@astrojs/netlify"/>
378
+
</p>
379
+
380
+
개발 모드에서 로컬 [Netlify Image CDN](https://docs.netlify.com/build/image-cdn/overview/) 지원을 활성화합니다.
381
+
382
+
이 경우 기본 Astro 이미지 서비스가 아닌 로컬 버전의 Netlify Image CDN을 사용합니다.
383
+
384
+
##### `devFeatures.environmentVariables`
385
+
386
+
<p>
387
+
**타입:**`boolean`<br />
388
+
**기본값:**`false`<br />
389
+
<Sincev="6.5.1"pkg="@astrojs/netlify"/>
390
+
</p>
391
+
392
+
Netlify 사이트의 환경 변수를 개발 환경으로 주입합니다.
393
+
394
+
이를 통해 프로덕션 환경과 동일한 값을 개발 환경에서 사용할 수 있습니다. 환경마다 다른 변수를 사용하는 방법을 비롯한 자세한 내용은 [환경 변수에 대한 Netlify 문서](https://docs.netlify.com/build/environment-variables/overview/)를 참조하세요.
395
+
331
396
## 실험적 기능
332
397
333
398
다음 기능들도 사용 가능하지만, 향후 업데이트에서 대규모 변경 (Breaking Changes)이 발생할 수 있습니다. 프로젝트에서 이 기능을 사용 중이라면 업데이트를 위해 [`@astrojs/netlify` 변경 로그](https://github.com/withastro/astro/tree/main/packages/integrations/netlify/CHANGELOG.md)를 주의 깊게 확인하세요.
0 commit comments