{"id":17179537,"url":"https://github.com/theandersonn/setup-react","last_synced_at":"2026-04-29T23:05:21.395Z","repository":{"id":95197647,"uuid":"393716899","full_name":"theandersonn/setup-react","owner":"theandersonn","description":"Configuração básica para rodar React sem o CRA","archived":false,"fork":false,"pushed_at":"2021-10-13T17:54:05.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T21:49:14.899Z","etag":null,"topics":["babel","react","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theandersonn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2021-08-07T15:13:16.000Z","updated_at":"2022-08-24T13:16:14.000Z","dependencies_parsed_at":"2023-06-12T11:15:23.957Z","dependency_job_id":null,"html_url":"https://github.com/theandersonn/setup-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theandersonn/setup-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theandersonn%2Fsetup-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theandersonn%2Fsetup-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theandersonn%2Fsetup-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theandersonn%2Fsetup-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theandersonn","download_url":"https://codeload.github.com/theandersonn/setup-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theandersonn%2Fsetup-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32447312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","react","webpack"],"created_at":"2024-10-15T00:26:32.098Z","updated_at":"2026-04-29T23:05:21.350Z","avatar_url":"https://github.com/theandersonn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# setup-react\nConfiguração básica para rodar React sem o CRA\n\n## Estrutura inicial e Instalação de dependências\n```bash\n# criar o arquivo `.gitignore` preenchendo com `node_modules`\necho node_modules \u003e\u003e .gitignore\n\n# iniciar o arquivo `package.json`\nyarn init -y\n\n# instalar `react` e `react-dom`\nyarn add react react-dom\n\n# instalar as dependencias relacionadas ao `webpack`\nyarn add webpack webpack-cli webpack-dev-server html-webpack-plugin -D\n\n# instalar as dependencias relacionadas ao `babel`\nyarn add @babel/core @babel/preset-env @babel/preset-react babel-loader -D\n\n# instalar as dependencias para utilizar css e sass\nyarn add style-loader css-loader sass-loader node-sass -D\n```\n\n## Configuração webpack\n```js\nconst path = require('path');\nconst HtmlWebPackPlugin = require(\"html-webpack-plugin\");\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    filename: 'main.js',\n    path: path.resolve(__dirname, 'dist'),\n  },\n  plugins: [\n    new HtmlWebPackPlugin({\n      template: path.resolve(__dirname, 'public/index.html'),\n      filename: 'index.html'\n    })\n  ],\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /node_modules/,\n        use: {\n          loader: 'babel-loader',\n          options: {\n            presets: ['@babel/preset-env', '@babel/preset-react']\n          }\n        }\n      },\n      {\n        test: /\\.css?$/,\n        use: [\n          { loader: \"style-loader\" },\n          { loader: \"css-loader\" },\n        ]\n      },\n      {\n        test: /\\.scss$/,\n        use: [\n          { loader: \"style-loader\" },\n          { loader: \"css-loader\" },\n          { loader: \"sass-loader\" }\n        ]\n      },\n    ]\n  }\n};\n```\n\n## Criar scripts no `package.json`\n```json\n\"scripts\": {\n  \"build:dev\": \"webpack --mode='development'\",\n  \"build:prod\": \"webpack --mode='production'\",\n  \"start\": \"webpack server --mode development --env development --hot --port 3000\"\n},\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheandersonn%2Fsetup-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheandersonn%2Fsetup-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheandersonn%2Fsetup-react/lists"}