{"id":23427097,"url":"https://github.com/thc-tools/babel-preset-react","last_synced_at":"2025-07-29T06:08:33.722Z","repository":{"id":42236755,"uuid":"137608067","full_name":"thc-tools/babel-preset-react","owner":"thc-tools","description":"Babel preset, for React project","archived":false,"fork":false,"pushed_at":"2025-05-11T03:07:31.000Z","size":619,"stargazers_count":0,"open_issues_count":33,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T13:14:28.887Z","etag":null,"topics":["babel","presets","react"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thc-tools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-16T20:20:31.000Z","updated_at":"2020-11-23T00:42:25.000Z","dependencies_parsed_at":"2023-02-05T01:30:48.433Z","dependency_job_id":"2a63c636-a015-43d6-9352-0530c7dfe10b","html_url":"https://github.com/thc-tools/babel-preset-react","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/thc-tools/babel-preset-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thc-tools%2Fbabel-preset-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thc-tools%2Fbabel-preset-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thc-tools%2Fbabel-preset-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thc-tools%2Fbabel-preset-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thc-tools","download_url":"https://codeload.github.com/thc-tools/babel-preset-react/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thc-tools%2Fbabel-preset-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265102741,"owners_count":23711580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","presets","react"],"created_at":"2024-12-23T06:17:02.879Z","updated_at":"2025-07-29T06:08:33.700Z","avatar_url":"https://github.com/thc-tools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-preset-react\n\nThis project's goal is to make a babel preset, to be used for React project built with webpack.\nThat way, the react applications only needs one dependency, and one preset for all the thing concerning babel.\n\n## How to use\n\nInstall the dependency as dev dependencies, and use the preset.\nPreset have two options\n\n-   mode : Can be \"development\", \"production\", \"test\"\n-   hot : If hot reload should be activated\n\n```json\n{\n    \"presets\": [\n        [\n            \"@thc/babel-preset-react\",\n            {\n                \"mode\": \"development\",\n                \"hot\": true\n            }\n        ]\n    ]\n}\n```\n\n## Presets used\n\nThis preset re-uses existing presets :\n\n-   @babel/preset-env =\u003e ES2017 compatibility, based on browerlist query\n-   @babel/preset-react =\u003e JSX handling + better debugging\n\nFor production :\n\n-   babel-preset-minify =\u003e minifying code for production use (may be replaced in the future by uglify-es instead)\n\n## Plugins used\n\nThis preset re-uses existing plugins:\n\n-   @babel/plugin-proposal-decorators =\u003e handling decorators, annotations\n-   @babel/plugin-proposal-class-properties =\u003e handling setting class properties (static, easy syntax, ...)\n-   @babel/plugin-proposal-function-bind =\u003e easy binding with :: notation (this.boundFunc = ::this.func, or that::this.func)\n-   @babel/plugin-proposal-object-rest-spread =\u003e handling object spreading ({a,b,...c} syntax)\n-   @babel/plugin-proposal-optional-chaining =\u003e handling optional chaining (a?.b?.c instead of a \u0026\u0026 a.b \u0026\u0026 a.b.c)\n-   @babel/plugin-proposal-nullish-coalescing-operator =\u003e handling default value (a ?? \"Default\" instead of a ? a : \"Default\")\n-   @babel/plugin-transform-runtime =\u003e optimizing babel transform, by reusing helpers in babel/runtime (ES6 mode)\n-   @babel/plugin-syntax-dynamic-import =\u003e support for import('module') syntax\n-   babel-plugin-lodash =\u003e optimizing lodash import (import {add} from 'lodash' =\u003e import add from 'lodash/fp/add')\n\nFor development :\n\n-   react-hot-loader/babel =\u003e handling hot reload for React app (to use with some conf in webpack)\n\nFor prduction :\n\n-   @babel/plugin-transform-react-inline-element =\u003e inlining call to React API, for smaller bundle.\n-   @babel/plugin-transform-react-constant-elements =\u003e hoists static React tree, avoiding calls to React.createElement, and skipping reconciling phase for subtree\n-   babel-plugin-transform-react-remove-prop-types =\u003e Remove proptype declaration from source, for a smaller bundle\n\n## Rules :\n\n-   Commit must follow [Conventional Commit convention](https://conventionalcommits.org/)\n-   [Pre-commit package](https://www.npmjs.com/package/pre-commit) should be use to enforce linting, tests validations, ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthc-tools%2Fbabel-preset-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthc-tools%2Fbabel-preset-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthc-tools%2Fbabel-preset-react/lists"}