This is a frontend boilerplate project set up using Rspack, Lit.js, TypeScript, TailwindCSS, Preact Signals, and esbuild. It is designed to help you quickly start your development process while maintaining modern build optimizations.
- Modern JavaScript and TypeScript support with esbuild
- Reactive state management using Preact Signals
- Hot Module Replacement (HMR) for efficient development
- CSS processing with TailwindCSS and PostCSS
- Optimized asset handling using Rspack
- Compression of assets for production
- Source maps for easier debugging in development
To get started with this boilerplate, clone the repository and install the dependencies:
git clone <repository-url>
cd <repository-name>
npm install
Make sure you have Node.js installed on your machine.
This project comes with several scripts to help you with your development and build processes:
-
Clean the build directory:
npm run clean
-
Build for production:
npm run build
-
Start the development server:
npm run start
<repository-name>
├── dist/ # Compiled and built files
├── src/ # Source files
│ ├── app.ts # Main entry point
│ └── index.html # HTML template
├── package.json # Project configuration
└── rspack.config.js # Rspack configuration
To start a development server with Hot Module Replacement, run:
npm run start
The development server will be available at http://localhost:9000
, and changes to your files will automatically reflect in the browser.
To create a production build with optimizations, run:
npm run build
This will generate optimized files in the dist
directory, ready for deployment.
This project is licensed under the MIT License. See the LICENSE file for details.