What is the significance of browserslist in package.json created by create-react-app

Tanzeel :

I was asked this in an interview. I could not answer.

"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]

I can see that Its an array. "not ie <=11" means will not run on lower than Internet Explorer v11 "op_mini" must be related to Opera mini.

But I want to know why it is required.

Fernando Souza :

That's a React configuration option to know which browsers the build process should target to.

As the documentation says:

The browserslist configuration controls the outputted JavaScript so that the emitted code will be compatible with the browsers specified.

If you are intend to use a ES feature make sure all browsers specified supports it, otherwise you have to include polyfills manually. React will not do it for you automatically.

See more in: https://facebook.github.io/create-react-app/docs/supported-browsers-features

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

create-react-appによって作成されたpackage.jsonのbrowserslistの意味は何ですか

分類Dev

react-create-app - get error about browserslist error

分類Dev

What for is the node_modules folder that is created by running npm install create-react-app for?

分類Dev

How to rename the folder created by create react app?

分類Dev

Get version number from package.json in React Redux (create-react-app)

分類Dev

create-react-appはpackage.jsonファイルのみを作成します

分類Dev

package.jsonのcreate-react-appプロキシ設定が機能しない

分類Dev

Created an app with create-react-native-app, how to publish it to the Google Play Store?

分類Dev

How can remove console.log in the production build of a React application created using create-react-app?

分類Dev

What is the location of .babelrc file when using react-create-app?

分類Dev

What is the best service worker strategy for create-react-app?

分類Dev

create-react-appがエラーをスローします:「package.jsonに依存関係がありません」

分類Dev

create-react-appのpackage.jsonホームページの最後の/を削除する方法

分類Dev

how to create a python package created using pybind?

分類Dev

What's the significance of "-0ubuntu1" at the end of a package version string?

分類Dev

How can I import Emscripten generated .wasm/js files in files created with create-react-app

分類Dev

How to import images from JSON data into create-react-app

分類Dev

What is the significance of the target argument in glBufferData

分類Dev

Create-React-App:package.jsonスクリプトからコードカバレッジレポートをトリガーできません

分類Dev

'npm install create-react-app'を実行しようとする際の問題-package.lock.jsonでsaveErrorが発生するのはなぜですか?

分類Dev

Google App Engine Flexible get access to a folder dynamically created by a package?

分類Dev

Package not created when I create new Java Project from VSCode

分類Dev

Favicon not displayed in create react app

分類Dev

What methods and objects does React package contain?

分類Dev

Create-React-AppパブリックフォルダーJSON

分類Dev

create-react-app + typescriptで静的JSONをインポートする

分類Dev

create-react-app Uncaught(in promise)SyntaxError:Unexpected token <in JSON in position 0

分類Dev

create-react-app testing "React is not defined"

分類Dev

What is the significance of 1/1/1753 in SQL Server?

Related 関連記事

  1. 1

    create-react-appによって作成されたpackage.jsonのbrowserslistの意味は何ですか

  2. 2

    react-create-app - get error about browserslist error

  3. 3

    What for is the node_modules folder that is created by running npm install create-react-app for?

  4. 4

    How to rename the folder created by create react app?

  5. 5

    Get version number from package.json in React Redux (create-react-app)

  6. 6

    create-react-appはpackage.jsonファイルのみを作成します

  7. 7

    package.jsonのcreate-react-appプロキシ設定が機能しない

  8. 8

    Created an app with create-react-native-app, how to publish it to the Google Play Store?

  9. 9

    How can remove console.log in the production build of a React application created using create-react-app?

  10. 10

    What is the location of .babelrc file when using react-create-app?

  11. 11

    What is the best service worker strategy for create-react-app?

  12. 12

    create-react-appがエラーをスローします:「package.jsonに依存関係がありません」

  13. 13

    create-react-appのpackage.jsonホームページの最後の/を削除する方法

  14. 14

    how to create a python package created using pybind?

  15. 15

    What's the significance of "-0ubuntu1" at the end of a package version string?

  16. 16

    How can I import Emscripten generated .wasm/js files in files created with create-react-app

  17. 17

    How to import images from JSON data into create-react-app

  18. 18

    What is the significance of the target argument in glBufferData

  19. 19

    Create-React-App:package.jsonスクリプトからコードカバレッジレポートをトリガーできません

  20. 20

    'npm install create-react-app'を実行しようとする際の問題-package.lock.jsonでsaveErrorが発生するのはなぜですか?

  21. 21

    Google App Engine Flexible get access to a folder dynamically created by a package?

  22. 22

    Package not created when I create new Java Project from VSCode

  23. 23

    Favicon not displayed in create react app

  24. 24

    What methods and objects does React package contain?

  25. 25

    Create-React-AppパブリックフォルダーJSON

  26. 26

    create-react-app + typescriptで静的JSONをインポートする

  27. 27

    create-react-app Uncaught(in promise)SyntaxError:Unexpected token <in JSON in position 0

  28. 28

    create-react-app testing "React is not defined"

  29. 29

    What is the significance of 1/1/1753 in SQL Server?

ホットタグ

アーカイブ