GitHub.com's official Babel preset for transpiling JavaScript. Current version 3.2.1 (released 2019, last updated 2019-08-08). Based on `@babel/preset-env` with curated set of plugins used by GitHub.com, including support for ES2018+ and some non-standard features. Targets GitHub's browser support matrix by default, but supports custom browserlist targets. Limited release cadence and narrow scope (primarily for internal GitHub usage). Minimal community adoption outside GitHub.
npm install babel-preset-githubVerified import paths — ran on the pinned version, not inferred.
Shows how to configure babel-preset-github in .babelrc file with optional browserslist customization.
Switch to @babel/preset-env with 'github' browserlist (e.g. 'last 1 chrome version, last 1 firefox version, last 1 safari version')
Use "presets": [["github", {"targets": {"browsers": ["last 1 version"]}}]]Specify explicit browserslist targets that match your project's requirements.
Run npm install --save-dev babel-preset-github @babel/core and ensure node_modules is intact.
Ensure the package is installed and .babelrc uses short name 'github' (not 'babel-preset-github').
Use require() instead of import: const preset = require('babel-preset-github')