14 |
15 | {{ config.public.apiBase }}
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/ui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@nuxt-monorepo/ui",
3 | "private": true,
4 | "type": "module",
5 | "main": "./nuxt.config.ts",
6 | "scripts": {
7 | "build": "nuxt build",
8 | "dev": "nuxt dev",
9 | "generate": "nuxt generate",
10 | "preview": "nuxt preview",
11 | "postinstall": "nuxt prepare"
12 | },
13 | "devDependencies": {
14 | "@nuxt/devtools": "latest",
15 | "nuxt": "^3.8.2",
16 | "vue": "^3.3.10",
17 | "vue-router": "^4.2.5"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@nuxt-monorepo/app",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "build": "nuxt build",
7 | "dev": "nuxt dev",
8 | "generate": "nuxt generate",
9 | "preview": "nuxt preview",
10 | "postinstall": "nuxt prepare"
11 | },
12 | "devDependencies": {
13 | "@nuxt-monorepo/ui": "workspace:^",
14 | "@nuxt/devtools": "latest",
15 | "nuxt": "^3.8.2",
16 | "vue": "^3.3.12",
17 | "vue-router": "^4.2.5"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Nuxt Monorepo Demo
2 |
3 | This project demonstrates how to use [Nuxt Layers](https://nuxt.com/docs/getting-started/layers) to build a complete monorepo architecture. You can also browse different [branches](https://github.com/serkodev/nuxt-monorepo/branches) to understand various application scenarios.
4 |
5 | Welcome to read this [blog post](https://serko.dev/post/nuxt-3-monorepo) to learn about the details of the entire architecture of this repo.
6 |
7 | ## Setup
8 |
9 | ```bash
10 | pnpm install
11 | ```
12 |
13 | ## Development
14 |
15 | ```bash
16 | # all packages
17 | pnpm dev
18 |
19 | # app only
20 | pnpm app dev
21 | ```
22 |
23 | ## Production
24 |
25 | ```bash
26 | # all packages
27 | pnpm build
28 |
29 | # app only
30 | pnpm app build
31 | ```
32 |
--------------------------------------------------------------------------------