Get Started
Create a Project
Run the following command to create an Esmx project:
Choose a Template
After running the command, you will see the template selection screen:
Available Templates
| Template | Description |
|---|
| shared-modules | Micro frontend shared modules solution |
| vue-csr | Vue 3 client-side rendering |
| vue-ssr | Vue 3 server-side rendering |
| vue2-csr | Vue 2.7 client-side rendering |
| vue2-ssr | Vue 2.7 server-side rendering |
Specify a Template
You can directly specify a template via -t or --template and skip interactive selection:
npm create esmx my-app --template vue-csr
Combined Parameters Example
npm create esmx my-app --template vue-ssr --name my-project --force
Start the Dev Server
After creation, enter the directory and start the dev server:
cd my-app
npm install
npm run dev
The dev server starts at http://localhost:3000.
Production Build
Build for production:
npm run build
npm run start
Troubleshooting
- Node.js version should be
>= 24.
- If the port is in use, update
npm run dev config or adjust the port env.
- If installation fails, check proxy settings or use a domestic mirror source.
Project Structure
The generated project structure:
my-app/
├── src/
│ ├── app.vue
│ ├── create-app.ts
│ ├── entry.client.ts
│ ├── entry.node.ts
│ ├── entry.server.ts
│ └── components/
│ └── hello-world.vue
├── tsconfig.json
├── package.json
└── README.md
Advanced Options
Overwrite Existing Directory
Use --force or -f to overwrite an existing directory:
npm create esmx my-app --force
Set Project Name
Use --name or -n to set a project name:
npm create esmx my-app --name my-project