Files
nrwl--nx/packages/web/docs/application-examples.md
2026-07-13 12:38:36 +08:00

36 lines
672 B
Markdown

## Examples
##### Simple Application
Create an application named `my-app`:
```bash
nx g @nx/web:application apps/my-app
```
##### Application using Vite as bundler
Create an application named `my-app`:
```bash
nx g @nx/web:app apps/my-app --bundler=vite
```
When choosing `vite` as the bundler, your unit tests will be set up with `vitest`, unless you choose `none` for `unitTestRunner`.
##### In a nested directory
Create an application named `my-app` in the `my-dir` directory:
```bash
nx g @nx/web:app apps/my-dir/my-app
```
##### Add tags
Add tags to the application (used for linting).
```bash
nx g @nx/web:app apps/my-app --tags=scope:admin,type:ui
```