Configuration for Web-based project compilation using Vite
Pre-configured Vite with:
- Typescript path resolution
- PostCSS preset with Tailwind detection
- Linting (TSC, Stylelint, ESLint)
- Compression (Brotli and Gzip)
- TLS Encryption
- Implement module federation logic for auto-resolution
- Install the package
pnpm install --dev @adaliszk/web-compiler vite
- Configure vite for development and bundling:
import { webConfig } from '@adaliszk/web-compiler' export default webConfig()
- Add vite commands to your scope:
"scripts": { "build": "vite build", "preview": "vite preview" "start": "vite" }
Since this is a meta-package, the versioning reflect its main provided package, in this case vite
. However, only the
Major and Minor versions are kept in sync, and the Patch is used to bump the meta-package.