Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docs/docs/browser-support.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
title: Browser Support
title: ブラウザーサポート
---

Gatsby supports [the same browsers as the current stable version of React.js](https://reactjs.org/docs/react-dom.html#browser-support) which is currently IE9+ as well as the most recent versions of other popular browsers.
Gatsby は[現在の安定バージョンの React.js と同じブラウザー](https://ja.reactjs.org/docs/react-dom.html#browser-support)をサポートしています。それらは現在では IE9+ およびその他の有名ブラウザーの最新バージョンとなります。

## Polyfills
## ポリフィル

Gatsby leverages Babel 7's ability to automatically add polyfills for your target browsers.
Gatsby Babel 7 を利用して自動的にあなたの対象ブラウザーへのポリフィルを追加します。

Newer browsers support more JavaScript APIs than older browsers. For older versions, Gatsby (via Babel) automatically adds the minimum "polyfills" necessary for your code to work in those browsers.
新しいブラウザーは古いブラウザーより多くの JavaScript API をサポートしています。古いバージョンに対応するため、Gatsby は(Babel によって)自動的にあなたのコードがそれらのブラウザーで動くために必要最小限の "ポリフィル" を追加します。

If you start using a newer JavaScript API like `[].includes` that isn't supported by some of your targeted browsers, you won't have to worry about it breaking the older browsers as Babel will automatically add the needed polyfill `core-js/modules/es7.array.includes`.
もし対象ブラウザーでサポートされていない新しい JavaScript API(たとえば `[].includes` など)を使った場合でも、Babel が必要なポリフィル `core-js/modules/es7.array.includes` を自動的に追加するため、古いブラウザーを壊してしまう心配はありません。

## Specify what browsers your project supports using "Browserslist"
## "Browserslist" を使ってあなたのプロジェクトでサポートするブラウザーを指定する

You may customize your list of supported browser versions by declaring a [`"browserslist"`](https://github.com/ai/browserslist) key within your `package.json`. Changing these values will modify your JavaScript (via[`babel-preset-env`](https://github.com/babel/babel-preset-env#targetsbrowsers)) and your CSS (via [`autoprefixer`](https://github.com/postcss/autoprefixer)) output.
`package.json` 内で [`"browserslist"`](https://github.com/ai/browserslist) キーを宣言することで、サポートしたいブラウザーバージョンの一覧を指定できます。それらの値を変えることで([`babel-preset-env`](https://github.com/babel/babel-preset-env#targetsbrowsers) によって)JavaScript と([`autoprefixer`](https://github.com/postcss/autoprefixer) によって)CSS の出力を変えることができます。

This article is a good introduction to the growing community of tools around Browserslist https://css-tricks.com/browserlist-good-idea/
この記事は Browserslist を取り巻くツールに関する成長中のコミュニティーへの良い導入です: https://css-tricks.com/browserlist-good-idea/

By default, Gatsby emulates the following config:
Gatsby はデフォルトで下記の設定を行います。

```json:title=package.json
{
"browserslist": [">0.25%", "not dead"]
}
```

If you only support newer browsers, make sure to specify this in your `package.json`. This will often enable you to ship smaller JavaScript files.
もしあなたが新しいブラウザーのみをサポートしたいなら、`package.json` を上記のように設定することを忘れないでください。この設定によって、ほとんどの場合より小さな JavaScript ファイルが生成されます。