{"id":14054369,"url":"https://github.com/denniscual/spinpack","last_synced_at":"2025-03-31T07:44:17.668Z","repository":{"id":243621968,"uuid":"812936061","full_name":"denniscual/spinpack","owner":"denniscual","description":"Spinpack is a CLI tool that turbocharges the developer server experience for CRA projects with Rspack","archived":false,"fork":false,"pushed_at":"2024-06-14T05:49:16.000Z","size":98,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T12:18:27.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/denniscual.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-06-10T07:31:33.000Z","updated_at":"2025-01-04T08:21:40.000Z","dependencies_parsed_at":"2024-12-03T12:43:34.381Z","dependency_job_id":null,"html_url":"https://github.com/denniscual/spinpack","commit_stats":null,"previous_names":["denniscual/spinpack"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniscual%2Fspinpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniscual%2Fspinpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniscual%2Fspinpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniscual%2Fspinpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denniscual","download_url":"https://codeload.github.com/denniscual/spinpack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436092,"owners_count":20776964,"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":[],"created_at":"2024-08-12T21:01:03.549Z","updated_at":"2025-03-31T07:44:17.649Z","avatar_url":"https://github.com/denniscual.png","language":"TypeScript","funding_links":[],"categories":["Libraries"],"sub_categories":["Unplugin"],"readme":"# Spinpack\n\nSpinpack is a CLI tool that turbocharges the developer server experience for [CRA](https://create-react-app.dev/) projects with [Rspack](https://www.rspack.dev/), a lightning-fast, Rust-based bundler.\n\n## Motivation\n\nSpinpack was designed to modernize the development experience for Create React App (CRA) users struggling with performance issues due to [Webpack](https://webpack.js.org/). By integrating Rspack, a fast, rust-based bundler, this tool accelerates development and modernizes your project’s tech stack without altering your workflow. It leverages [Rsbuild](https://rsbuild.dev/), the Rspack powered build tool, to quickly spin up developer servers. This solution ensures developers remain productive and efficient, maintaining familiarity while benefiting from improved performance.\n\n## Usage\n\n### Initializing a Project\n\nTo prepare your project to use Webpack and Rspack, run:\n\n```bash\nnpx @denniscual/spinpack init\n```\n\nThis command will:\n\n- Create an rsbuild.config.ts configuration file in your project directory to spin-up an Rspack dev server.\n- Install necessary dependencies for RSPack.\n- Update your .gitignore to exclude the appropriate files.\n\n### Starting the Development Server\n\nTo start the development server, use:\n\n```bash\nnpx @denniscual/spinpack start\n```\n\nOptions:\n\n- -rs, --rspack: Use Rspack for the development server.\n- -cr, --craco: Use CRACO, custom create-react-app webpack config, for the development server.\n- --react-scripts: Use React Scripts, default create-react-app webpack config, for the development server (default).\n\nExample:\n\n```bash\nnpx @denniscual/spinpack start --rspack\n```\n\nThis will start the development server using Rspack. If no option is provided, Webpack will be used by default.\n\n## Frequently Asked Questions (FAQ)\n\n### How does Spinpack handle configuration settings between CRA and Rspack?\n\nSpinpack enhances the development experience by aligning Rspack configurations with Create React App’s (CRA) environment variables. By treating CRA’s configurations as the source of truth, Spinpack automatically applies these settings to Rspack, eliminating the need for separate configuration efforts. This approach not only simplifies development by minimizing configuration duplication but also ensures consistent settings across both tools. For example, changing the server port via CRA’s `PORT` environment variable will automatically adjust the port for Rspack when using Spinpack:\n\nDefine in `.env` file\n\n```\n# Set the development server port to 3001\nPORT=3001\n```\n\nStart dev server with Rspack\n\n```bash\nnpx @denniscual/spinpack start --rspack\n```\n\nThis streamlined configuration process ensures that developers can focus on their code, not on managing tool settings.\n\n_Currently, updating Rspack, `rsbuild.config.ts`, configurations and expecting them to reflect in CRA’s Webpack configuration is not supported. However, we are exploring the possibility of enabling this in future updates._\n\n### Does Spinpack support production builds?\n\nCurrently, Spinpack is focused exclusively on enhancing the development server experience. This ensures that developers can use Spinpack to quickly spin up a development environment using either CRA Webpack Config or Rspack without affecting the existing production build process.\n\nSpinpack does generate a build configuration file, `rsbuild.config.ts`, within the project, which developers can fine-tune for production use. However, because projects often have unique requirements such as the need for specific Webpack plugins when leveraging [CRACO](https://craco.js.org/) or other similar tools for customization—this generated config might require further adjustments to fully meet production standards.\n\nWe highly consider adding support for production environments through Spinpack in future updates. This would streamline the process of using the tool's configurations directly for production builds, potentially reducing the need for extensive custom setups.\n\n## License\n\nMIT © [denniscual](https://github.com/denniscual/spinpack/blob/master/LICENSE.MD)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniscual%2Fspinpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenniscual%2Fspinpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniscual%2Fspinpack/lists"}