{"id":13782174,"url":"https://github.com/jaredpalmer/react-parcel-example","last_synced_at":"2025-04-06T01:10:18.479Z","repository":{"id":40003007,"uuid":"113223928","full_name":"jaredpalmer/react-parcel-example","owner":"jaredpalmer","description":"Minimum viable React app with Parcel Bundler","archived":false,"fork":false,"pushed_at":"2018-03-05T01:29:02.000Z","size":67,"stargazers_count":482,"open_issues_count":5,"forks_count":58,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T00:09:16.577Z","etag":null,"topics":["parcel","react"],"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/jaredpalmer.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}},"created_at":"2017-12-05T19:25:58.000Z","updated_at":"2024-05-23T15:23:38.000Z","dependencies_parsed_at":"2022-06-26T07:07:14.790Z","dependency_job_id":null,"html_url":"https://github.com/jaredpalmer/react-parcel-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Freact-parcel-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Freact-parcel-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Freact-parcel-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredpalmer%2Freact-parcel-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredpalmer","download_url":"https://codeload.github.com/jaredpalmer/react-parcel-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419861,"owners_count":20936012,"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":["parcel","react"],"created_at":"2024-08-03T18:01:33.730Z","updated_at":"2025-04-06T01:10:18.461Z","avatar_url":"https://github.com/jaredpalmer.png","language":"JavaScript","readme":"# React Parcel Example\n\nA minimum viable React app with [Parcel Bundler](https://parceljs.org)\n\n**What's inside?**\n\n* `parcel-bundler`\n* `react`\n* `react-dom`\n* `babel-preset-react-app`\n* `autoprefixer`\n\n\u003e Also [checkout out the TypeScript branch](https://github.com/jaredpalmer/react-parcel-example/tree/typescript)\n\n## Getting started\n\nClone and install deps\n\n```\ngit clone git@github.com:jaredpalmer/react-parcel-example.git\ncd react-parcel-example\nyarn\nyarn start\n```\n\nThen open `http://localhost:1234` and edit `index.js` and press save. Parcel\nwill automagically hot reload you files whenever you make changes.\n\n## Building for Production\n\n```\nnpm run build\n```\n\nThis will compile your JS and copy your `index.html` to the `dist` folder which\nyou can deploy wherever as a good ol' webpage.\n\n## CSS\n\n[Parcel uses PostCSS plugins to manage CSS assets](https://parceljs.org/transforms.html#postcss).\nI've included `autoprefixer` for vendor prefixing with the same setup as\n`create-react-app`. You can find and modify the PostCSS setup in `package.json`.\nIf you'd rather keep your PostCSS setup in a dotfile, you can delete the\n`postcss` key from `package.json`, and place its contents in a `.postcssrc` file\ntoo.\n\n## Folder structure and relative paths\n\nKeeping everything in the root directory obviously won't scale past a point.\nParcel is very flexible about folder structure, but there are a few gotchas.\n\n### Moving JS entry\n\nWhen you do move index.js just make sure to update the `\u003cscript\u003e` tag in\n`index.html` so that it points to the correct relative path.\n\nFor example, if you want to move `index.js` to `src/index.js`, you would need\nmake the following change to `index.html`:\n\n```\n\u003c   \u003cscript src=\"./index.js\"\u003e\u003c/script\u003e\n---\n\u003e   \u003cscript src=\"./src/index.js\"\u003e\u003c/script\u003e\n```\n\n### Moving `index.html`\n\nIf you want to move `index.html`, you will need to update your npm scripts in\n`package.json` with the new relative path.\n\n## Deployment\n\nRefer to the deployment guide in `create-react-app`, just note that you will\nneed to account for the fact that Parcel builds out to a `dist` directory, while\nCRA builds to a `build` directory. You can make it identical by adding\n`--out-dir build` to both `start` and `build` npm tasks in `package.json`.\n","funding_links":[],"categories":["Examples"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Freact-parcel-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredpalmer%2Freact-parcel-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredpalmer%2Freact-parcel-example/lists"}