Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alstonchan/react-generator
A React app generator bundled with Webpack 5 and Babel/SWC
https://github.com/alstonchan/react-generator
babel create-react-app es6 eslint react reacttestinglibrary scss swc webpack
Last synced: 22 days ago
JSON representation
A React app generator bundled with Webpack 5 and Babel/SWC
- Host: GitHub
- URL: https://github.com/alstonchan/react-generator
- Owner: AlstonChan
- License: mit
- Created: 2022-08-06T09:27:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T02:39:21.000Z (4 months ago)
- Last Synced: 2024-10-05T11:54:17.993Z (about 1 month ago)
- Topics: babel, create-react-app, es6, eslint, react, reacttestinglibrary, scss, swc, webpack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@chan_alston/react-generator
- Size: 1.55 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# React Generator (Webpack + Babel/SWC)
A React app generator bundled with Webpack 5 and Babel/SWC
## Features
- [x] Webpack Hot Module Replacement
- [x] Bundle Optimization
- [x] React Testing Library with Jest/Vitest for unit testing
- [x] Support for various type of images, fonts
- [x] Transpile code with Babel/SWC
- [x] Support css module and scss module
- [x] Minified js and stylesheet
- [x] Integrated BundleAnalyzerPlugin to inspect bundle size
- [x] Remove console.log() on production## Usage
To create a react project, you can run the following command.
```bash
npx @chan_alston/react-generator@latest
```You will then be prompted to enter your *project name* select the package manager you desire and the transpiler you want the project to use.
## File Structure
Using Babel as transpiler:
```text
my-app
└── __mocks__
├── fileTransformer.js
├── identity-obj-proxy-esm.js
├── intersectionObserverMock.js
└── setupTests.js
└── public
└── font
└── PoetsenOne.tff
├── favicon.ico
├── index.html
├── react.png
└── webpack.png
└── src
├── index.js
└── routes
└── __test__
└──index.test.js
├── _routes.js
└── index.js
└── styles
├── global.scss
└── homepage.module.scss
├── .env.example
├── babel.config.cjs
├── .eslint.config.mjs
├── .gitignore
├── jest.config.js
├── package.json
├── postcss.config.js
├── README.md
├── webpack.config.js
├── webpack.dev.js
└── webpack.prod.js
```Using SWC as transpiler:
```text
my-app
└── public
└── font
└── PoetsenOne.tff
├── favicon.ico
├── index.html
├── react.png
└── webpack.png
└── src
├── index.js
└── test
└── index.test.jsx
└── routes
├── _routes.jsx
└── index.jsx
└── styles
├── global.scss
└── homepage.module.scss
├── .env.example
├── .eslint.config.mjs
├── .gitignore
├── package.json
├── postcss.config.js
├── README.md
├── .swcrc
├── vitest.config.mjs
├── vitest.setup.mjs
├── webpack.config.js
├── webpack.dev.js
└── webpack.prod.js
```