UNPKG

create-esmx

Version:

A scaffold tool for creating Esmx projects

86 lines (60 loc) • 1.99 kB
# {{projectName}} An Esmx project demonstrating Shared Modules solution for micro-frontend architecture. ## šŸ“¦ Tech Stack - **Framework**: [Esmx](https://esmx.dev) - Next generation micro-frontend framework based on native ESM - **Solution Focus**: Shared Modules for multi-framework environments - **Build Tool**: Rspack - **Type Checking**: TypeScript ## šŸŽÆ Core Features - **Module Sharing**: Share modules across different framework versions - **Zero Overhead**: Native ESM-based sharing with no runtime cost - **Version Isolation**: Safe module sharing between framework versions - **SSR Compatible**: Full server-side rendering support with shared modules ## šŸš€ Quick Start ### Install Dependencies ```bash {{installCommand}} ``` ### Development Environment ```bash {{devCommand}} ``` Visit http://localhost:3000 to see the development environment. ### Production Build ```bash {{buildCommand}} ``` ### Start Production Server ```bash {{startCommand}} ``` ### Type Generation ```bash {{buildTypeCommand}} ``` ### Type Checking ```bash {{lintTypeCommand}} ``` ## šŸ“ Project Structure ``` {{projectName}}/ ā”œā”€ā”€ src/ │ ā”œā”€ā”€ entry.client.ts # Client-side entry │ ā”œā”€ā”€ entry.node.ts # Node.js environment entry point │ ā”œā”€ā”€ entry.server.ts # Server-side rendering functions │ ā”œā”€ā”€ vue/ │ │ └── index.ts # Vue 3 shared modules │ └── vue2/ │ └── index.ts # Vue 2 shared modules ā”œā”€ā”€ package.json ā”œā”€ā”€ tsconfig.json └── README.md ``` ## šŸ”§ Configuration Details - `entry.client.ts` - Responsible for client-side shared module consistency checking - `entry.node.ts` - Handles shared module configuration and scope mapping - `entry.server.ts` - Manages shared module rendering and HTML generation ## šŸ“š Additional Resources - [Esmx Official Documentation](https://esmx.dev) - [TypeScript Documentation](https://www.typescriptlang.org)