{"id":21534143,"url":"https://github.com/milan-960/reactjs-webpack-template","last_synced_at":"2026-05-04T01:34:46.977Z","repository":{"id":231522976,"uuid":"622187304","full_name":"Milan-960/Reactjs-webpack-template","owner":"Milan-960","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-05T11:43:15.000Z","size":1731,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-22T14:13:26.864Z","etag":null,"topics":["babel-plugin","babelrc","eslint-config","eslintr","reactjs","webpack"],"latest_commit_sha":null,"homepage":"https://reactjs-webpack-template.vercel.app","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/Milan-960.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}},"created_at":"2023-04-01T11:34:52.000Z","updated_at":"2023-04-21T09:56:04.000Z","dependencies_parsed_at":"2024-04-04T12:59:57.956Z","dependency_job_id":"5588152d-8d03-40d9-809d-5e0bd6411ec6","html_url":"https://github.com/Milan-960/Reactjs-webpack-template","commit_stats":null,"previous_names":["milan-960/reactjs-webpack-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/Milan-960/Reactjs-webpack-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milan-960%2FReactjs-webpack-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milan-960%2FReactjs-webpack-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milan-960%2FReactjs-webpack-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milan-960%2FReactjs-webpack-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milan-960","download_url":"https://codeload.github.com/Milan-960/Reactjs-webpack-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milan-960%2FReactjs-webpack-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"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-plugin","babelrc","eslint-config","eslintr","reactjs","webpack"],"created_at":"2024-11-24T03:09:15.370Z","updated_at":"2026-05-04T01:34:46.961Z","avatar_url":"https://github.com/Milan-960.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  React + Webpack Template\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    A \u003ca href=\"https://react.dev\"\u003eReact\u003c/a\u003e + \u003ca href=\"https://webpack.js.org/\"\u003eWebpack\u003c/a\u003e starter template.\n\u003c/p\u003e\n\n\u003cimg align=\"right\" src=\"./SS/homenew.png\" width=\"100%\"/\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\n# How to configure webpack from scratch\n\n**_Create a new directory for your project and navigate to it in your terminal._**\n\n## Follow up the steps!\n\n## 1. Initialize a new npm package by running the following command in your terminal and following the prompts:\n\n```\nnpm init\n```\n\n## 2. Now you will need to install the necessary dependencies for the project by running the following command in your terminal:\n\n```\nnpm install --save react react-dom\n```\n\n## 3. we are installing all the necessary dependencies at once!\n\n```\nnpm install --save-dev webpack webpack-cli webpack-dev-server babel-loader @babel/core @babel/preset-env @babel/preset-react css-loader style-loader eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react prettier\n```\n\n### Note: This will install `React`, `React-DOM`, `Webpack`, `Webpack` `CLI`, `Webpack` `Dev` `Server`, `Babel`, `ESLint`, `Prettier`, and some `loaders` and `plugins`.\n\n## 4. Now Create a new file called `webpack.config.js` in the root of your project with the following contents:\n\n`webpack.config.js`\n\n```const path = require('path');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.(js|jsx)$/,\n        exclude: /node_modules/,\n        use: {\n          loader: 'babel-loader',\n        },\n      },\n      {\n        test: /\\.css$/,\n        use: ['style-loader', 'css-loader'],\n      },\n    ],\n  },\n  devServer: {\n    static: {\n      directory: path.join(__dirname, 'public'),\n    },\n    port: 3000,\n    hot: true,\n  },\n};\n\n```\n\n\u003ch3\u003eAfter that \u003c/h3\u003e\n\n## 5. Create a new file called `.babelrc` in the root of your project with the following contents:\n\n`.babelrc`\n\n```\n{\n  \"presets\": [\"@babel/preset-env\", \"@babel/preset-react\"]\n}\n```\n\nThis will set up Babel to use the `@babel/preset-env` and `@babel/preset-react presets`\n\n## 6. Create a new file called .eslintrc.json in the root of your project with the following contents:\n\n```.eslintrc\n\n```\n\n```\n{\n  \"extends\": [\n    \"eslint:recommended\",\n    \"plugin:react/recommended\",\n    \"plugin:prettier/recommended\"\n  ],\n  \"plugins\": [\"react\", \"prettier\"],\n  \"rules\": {\n    \"prettier/prettier\": \"error\"\n  },\n  \"parserOptions\": {\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    },\n    \"sourceType\": \"module\",\n    \"ecmaVersion\": 2020\n  },\n  \"env\": {\n    \"browser\": true,\n    \"es6\": true\n  }\n}\n\n```\n\n## 7. Create a new file called .prettierrc in the root of your project with the following contents:\n\n`prettierrc`\n\n```\n{\n  \"semi\": true,\n  \"trailingComma\": \"es5\",\n  \"singleQuote\": true,\n  \"printWidth\": 80,\n  \"tabWidth\": 2,\n  \"arrowParens\": \"avoid\",\n  \"endOfLine\": \"auto\"\n}\n\n```\n\n## 8. Update your package.json file with the following scripts:\n\n`package.json`\n\n```\n\"scripts\": {\n  \"start\": \"webpack serve --mode development --open\",\n    \"build\": \"webpack --mode production\",\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\",\n    \"lint\": \"eslint --fix --ext .js,.jsx,.ts,.tsx src/**/*.{js,jsx,ts,tsx}\"\n},\n```\n\n## 9. Run npm start in your terminal to start the development server.\n\n```\nnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilan-960%2Freactjs-webpack-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilan-960%2Freactjs-webpack-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilan-960%2Freactjs-webpack-template/lists"}