fix: monorepo build

This commit is contained in:
Simon
2025-12-16 01:52:15 +08:00
parent 54eb50f7be
commit c2e9e6a571
4 changed files with 7 additions and 5 deletions

View File

@@ -19,7 +19,6 @@ And other internal packages:
```bash
npm start # Start website dev server
npm run build # Build all packages
npm run build:lib # Build page-agent library only
npm run lint # ESLint with TypeScript strict rules
```
@@ -28,7 +27,6 @@ npm run lint # ESLint with TypeScript strict rules
```bash
# Core library
npm run build --workspace=page-agent
npm run build:watch --workspace=page-agent
# Website
npm run dev --workspace=@page-agent/website

View File

@@ -34,7 +34,13 @@ const libConfig = {
},
outDir: resolve(__dirname, 'dist', 'lib'),
rollupOptions: {
external: ['ai', 'ai-motion', 'chalk', 'zod', '@page-agent/*'],
external: [
'ai-motion',
'chalk',
'zod',
// all the internal packages
/^@page-agent\//,
],
},
minify: false,
sourcemap: true,

View File

@@ -32,7 +32,6 @@
"homepage": "https://alibaba.github.io/page-agent/",
"scripts": {
"build": "vite build",
"build:watch": "vite build --watch",
"prepublishOnly": "node -e \"const fs=require('fs');['LICENSE'].forEach(f=>fs.copyFileSync('../../'+f,f))\"",
"postpublish": "node -e \"['LICENSE'].forEach(f=>{try{require('fs').unlinkSync(f)}catch{}})\""
}

View File

@@ -32,7 +32,6 @@
"homepage": "https://alibaba.github.io/page-agent/",
"scripts": {
"build": "vite build",
"build:watch": "vite build --watch",
"prepublishOnly": "node -e \"const fs=require('fs');['LICENSE'].forEach(f=>fs.copyFileSync('../../'+f,f))\"",
"postpublish": "node -e \"['LICENSE'].forEach(f=>{try{require('fs').unlinkSync(f)}catch{}})\""
},