{"_id":"@empjs/cdn-vue-router-pinia","_rev":"5-9f7a7690879d0bac1836fb36bfca51c2","name":"@empjs/cdn-vue-router-pinia","dist-tags":{"latest":"3.5.1"},"versions":{"0.3.5":{"name":"@empjs/cdn-vue-router-pinia","version":"0.3.5","author":{"name":"Ken"},"license":"MIT","_id":"@empjs/cdn-vue-router-pinia@0.3.5","maintainers":[{"name":"ron0115","email":"liangzr0115@gmail.com"},{"name":"ckken","email":"ckken@qq.com"},{"name":"doerme","email":"398921432@qq.com"}],"homepage":"https://github.com/empjs/emp#readme","bugs":{"url":"https://github.com/empjs/emp/issues"},"dist":{"shasum":"0c10896795e5d7a2c978844c8bd55bb455cea4a6","tarball":"https://registry.npmjs.org/@empjs/cdn-vue-router-pinia/-/cdn-vue-router-pinia-0.3.5.tgz","fileCount":12,"integrity":"sha512-p9ntx8gYQPfnNTlXbAezhLyOMNrLWaUocKXMwHLTkgcENKRISVozhyaO0l/IgnyKzNG8Sv67iAUxQyIwtJjAPA==","signatures":[{"sig":"MEQCIFLYE3sTzgIpkk86ZI/jnEaTC6fB/08EW5RC58CjiItxAiArSOtvWTyj51gYyKyI7wxqRc5nDLmtmiP6bMRYJGvi9A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4410353},"main":"dist/vueRouter.production.umd.js","type":"module","_from":"file:empjs-cdn-vue-router-pinia-0.3.5.tgz","types":"dist/vueRouter.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"pnpm run /^dev:.*/","build":"tsup","start":"serve ./dist --cors -p 2300","dev:serve":"serve ./dist --cors -p 2300","dev:bundle":"tsup --watch"},"_npmUser":{"name":"ckken","email":"ckken@qq.com"},"_resolved":"/private/var/folders/tp/bsz0_k6x5gl9sv2w2ps8st0h0000gp/T/1766b8b0e947bd35003cf5183d7759c5/empjs-cdn-vue-router-pinia-0.3.5.tgz","_integrity":"sha512-p9ntx8gYQPfnNTlXbAezhLyOMNrLWaUocKXMwHLTkgcENKRISVozhyaO0l/IgnyKzNG8Sv67iAUxQyIwtJjAPA==","repository":{"url":"git+https://github.com/empjs/emp.git","type":"git","directory":"packages/cdn-vue-router-pinia"},"_npmVersion":"10.9.3","description":"empShare runtime","directories":{},"_nodeVersion":"22.19.0","dependencies":{"vue":"^3.5.21","pinia":"^3.0.3","vue-router":"^4.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.10.4","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cdn-vue-router-pinia_0.3.5_1757994795542_0.9671601751989487","host":"s3://npm-registry-packages-npm-production"}},"3.5.0-1":{"name":"@empjs/cdn-vue-router-pinia","version":"3.5.0-1","author":{"name":"Ken"},"license":"MIT","_id":"@empjs/cdn-vue-router-pinia@3.5.0-1","maintainers":[{"name":"ron0115","email":"liangzr0115@gmail.com"},{"name":"ckken","email":"ckken@qq.com"},{"name":"doerme","email":"398921432@qq.com"}],"homepage":"https://github.com/empjs/emp#readme","bugs":{"url":"https://github.com/empjs/emp/issues"},"dist":{"shasum":"f1c5e81a37c87b08eaa5623bbb4bd32b51960ccc","tarball":"https://registry.npmjs.org/@empjs/cdn-vue-router-pinia/-/cdn-vue-router-pinia-3.5.0-1.tgz","fileCount":8,"integrity":"sha512-DsCYGHnrFYQGBlLmGSuaGQxD7oAJbhig7g44wmAV0lPuaev+lc55OjGXPQfCA56QfCBi908U47/C7cjhza7G/Q==","signatures":[{"sig":"MEYCIQCBzsH0Sp/X089jWctpNF8LKFIj6J14MVSzQ26hCGTALQIhANNCAqwTKBrrJjYdgpH3DtOSy4l4EEx/h7Pw3mivVNnQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1407526},"main":"dist/vueRouter.production.umd.js","type":"module","_from":"file:empjs-cdn-vue-router-pinia-3.5.0-1.tgz","types":"dist/vueRouter.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"pnpm run /^dev:.*/","build":"tsup","start":"serve ./dist --cors -p 2300","dev:serve":"serve ./dist --cors -p 2300","dev:bundle":"tsup --watch"},"_npmUser":{"name":"ckken","email":"ckken@qq.com"},"_resolved":"/private/var/folders/tp/bsz0_k6x5gl9sv2w2ps8st0h0000gp/T/02678b2126ec426909cd591a21dbb28b/empjs-cdn-vue-router-pinia-3.5.0-1.tgz","_integrity":"sha512-DsCYGHnrFYQGBlLmGSuaGQxD7oAJbhig7g44wmAV0lPuaev+lc55OjGXPQfCA56QfCBi908U47/C7cjhza7G/Q==","repository":{"url":"git+https://github.com/empjs/emp.git","type":"git","directory":"packages/cdn-vue-router-pinia"},"_npmVersion":"10.9.3","description":"empShare runtime","directories":{},"_nodeVersion":"22.19.0","dependencies":{"vue":"^3.5.21","pinia":"^3.0.3","vue-router":"^4.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.10.4","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cdn-vue-router-pinia_3.5.0-1_1758005194058_0.49267408908656796","host":"s3://npm-registry-packages-npm-production"}},"3.5.0":{"name":"@empjs/cdn-vue-router-pinia","version":"3.5.0","author":{"name":"Ken"},"license":"MIT","_id":"@empjs/cdn-vue-router-pinia@3.5.0","maintainers":[{"name":"ron0115","email":"liangzr0115@gmail.com"},{"name":"ckken","email":"ckken@qq.com"},{"name":"doerme","email":"398921432@qq.com"}],"homepage":"https://github.com/empjs/emp#readme","bugs":{"url":"https://github.com/empjs/emp/issues"},"dist":{"shasum":"01aedc8e8bf3930acfa04649513d77a8d09309f5","tarball":"https://registry.npmjs.org/@empjs/cdn-vue-router-pinia/-/cdn-vue-router-pinia-3.5.0.tgz","fileCount":8,"integrity":"sha512-uIYbAmMiMafT62lA5gw8++Imcjt5PARTRhBAwqE5e0KMq5HSlXrh9s4eI40Jsc+H2i3rswBDwdvlJ5N5WIUS2A==","signatures":[{"sig":"MEUCIGGzIq1cKxVnNGMcRWG8nKbChQf3ccG14Z1cSh9KhcYHAiEA0yz0xp6ZItBWPG55RgFcaQBAMOITyAHpnXdn+V8CTeg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":720861},"main":"dist/vueRouter.production.umd.js","type":"module","_from":"file:empjs-cdn-vue-router-pinia-3.5.0.tgz","types":"dist/vueRouter.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"pnpm run /^dev:.*/","build":"tsup","start":"serve ./dist --cors -p 2300","dev-rs":"pnpm run /^dev-rs:.*/","build-rs":"rslib build","dev:serve":"serve ./dist --cors -p 2300","dev:bundle":"tsup --watch","dev-rs:serve":"serve ./dist --cors -p 2300","dev-rs:bundle":"rslib build --watch"},"_npmUser":{"name":"ckken","email":"ckken@qq.com"},"_resolved":"/private/var/folders/tp/bsz0_k6x5gl9sv2w2ps8st0h0000gp/T/73974e6728d6dfe5cb1aabfb57ae5b9f/empjs-cdn-vue-router-pinia-3.5.0.tgz","_integrity":"sha512-uIYbAmMiMafT62lA5gw8++Imcjt5PARTRhBAwqE5e0KMq5HSlXrh9s4eI40Jsc+H2i3rswBDwdvlJ5N5WIUS2A==","repository":{"url":"git+https://github.com/empjs/emp.git","type":"git","directory":"packages/cdn-vue-router-pinia"},"_npmVersion":"10.9.3","description":"empShare runtime","directories":{},"_nodeVersion":"22.19.0","dependencies":{"vue":"^3.5.21","pinia":"^3.0.3","vue-router":"^4.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.10.4","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cdn-vue-router-pinia_3.5.0_1758008899860_0.2961382119154423","host":"s3://npm-registry-packages-npm-production"}},"3.5.1":{"name":"@empjs/cdn-vue-router-pinia","version":"3.5.1","author":{"name":"Ken"},"license":"MIT","_id":"@empjs/cdn-vue-router-pinia@3.5.1","maintainers":[{"name":"ron0115","email":"liangzr0115@gmail.com"},{"name":"ckken","email":"ckken@qq.com"},{"name":"doerme","email":"398921432@qq.com"}],"homepage":"https://github.com/empjs/emp#readme","bugs":{"url":"https://github.com/empjs/emp/issues"},"dist":{"shasum":"59d370234cd9083fe0113900fba0cfab4244a77f","tarball":"https://registry.npmjs.org/@empjs/cdn-vue-router-pinia/-/cdn-vue-router-pinia-3.5.1.tgz","fileCount":8,"integrity":"sha512-Q0rPLb2o9+BZ8w4qGTZ84i4ig8ZGnpTOe+b7gOzBA9UX6ZWzBwBWvJAJRoGtUgbKE2lhphT/xoa6ZduISv3yMQ==","signatures":[{"sig":"MEYCIQCXVT/b3bn8FPY9mY5uJJxWwN1ATkAuyTbHTRQrXENI3QIhAKNqYJ20L+lay2uqszvvDqGW2HGTv9c4hKS9EutL09JM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1407689},"main":"dist/vueRouter.production.umd.js","type":"module","_from":"file:empjs-cdn-vue-router-pinia-3.5.1.tgz","types":"dist/vueRouter.d.ts","engines":{"node":">=16.0.0"},"scripts":{"dev":"pnpm run /^dev:.*/","build":"tsup","start":"serve ./dist --cors -p 2300","dev-rs":"pnpm run /^dev-rs:.*/","build-rs":"rslib build","dev:serve":"serve ./dist --cors -p 2300","dev:bundle":"tsup --watch","dev-rs:serve":"serve ./dist --cors -p 2300","dev-rs:bundle":"rslib build --watch"},"_npmUser":{"name":"ckken","email":"ckken@qq.com"},"_resolved":"/private/var/folders/tp/bsz0_k6x5gl9sv2w2ps8st0h0000gp/T/6c2fda6a7f893db2c96c2ab97fc4ee73/empjs-cdn-vue-router-pinia-3.5.1.tgz","_integrity":"sha512-Q0rPLb2o9+BZ8w4qGTZ84i4ig8ZGnpTOe+b7gOzBA9UX6ZWzBwBWvJAJRoGtUgbKE2lhphT/xoa6ZduISv3yMQ==","repository":{"url":"git+https://github.com/empjs/emp.git","type":"git","directory":"packages/cdn-vue-router-pinia"},"_npmVersion":"10.9.3","description":"empShare runtime","directories":{},"_nodeVersion":"22.19.0","dependencies":{"vue":"^3.5.21","pinia":"^3.0.3","vue-router":"^4.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@swc/core":"^1.10.4","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/cdn-vue-router-pinia_3.5.1_1758519833724_0.1496323944448099","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-09-16T03:53:15.450Z","modified":"2026-02-27T02:17:24.015Z","0.3.5":"2025-09-16T03:53:15.801Z","3.5.0-1":"2025-09-16T06:46:34.244Z","3.5.0":"2025-09-16T07:48:20.062Z","3.5.1":"2025-09-22T05:43:53.951Z"},"bugs":{"url":"https://github.com/empjs/emp/issues"},"author":{"name":"Ken"},"license":"MIT","homepage":"https://github.com/empjs/emp#readme","repository":{"url":"git+https://github.com/empjs/emp.git","type":"git","directory":"packages/cdn-vue-router-pinia"},"description":"empShare runtime","maintainers":[{"email":"liangzr0115@gmail.com","name":"ron0115"},{"email":"ckken@qq.com","name":"ckken"},{"email":"398921432@qq.com","name":"doerme"},{"email":"252308868@qq.com","name":"gaxking"}],"readme":"# @empjs/cdn-vue-router-pinia\n\n为业务使用优化的 Vue 3 + Vue Router + Pinia 最小化 CDN Bundle。\n\n## 📦 Bundle 版本\n\n| 文件名 | 大小 | 包含内容 | 使用场景 |\n|--------|------|----------|----------|\n| `vue.min.umd.js` | ~569KB | Vue 3 + Pinia | 只需要状态管理的应用 |\n| `vueRouter.min.umd.js` | ~674KB | Vue 3 + Vue Router + Pinia | 完整的 SPA 应用 |\n\n> 🎯 **精简版本**: 只保留两个核心bundle，体积最小化优化！\n\n## 🚀 快速开始\n\n### Vue + Pinia 使用\n\n```html\n<!-- 引入Vue + Pinia -->\n<script src=\"https://your-cdn.com/vue.min.umd.js\"></script>\n<script>\nconst { createApp, ref } = EMP_VUE_PINIA;\nconst { createPinia, defineStore } = EMP_VUE_PINIA;\n\n// 你的应用代码...\n</script>\n```\n\n### Vue + Vue Router + Pinia 使用\n\n```html\n<script src=\"https://your-cdn.com/vueRouter.min.umd.js\"></script>\n<script>\nconst { createApp, ref, createRouter, createWebHistory, createPinia } = EMP_ADAPTER_VUE;\n\nconst app = createApp({\n  setup() {\n    const count = ref(0);\n    return { count };\n  }\n});\n\napp.use(createRouter({ history: createWebHistory(), routes: [] }));\napp.use(createPinia());\napp.mount('#app');\n</script>\n```\n\n### 超级最小化版本\n\n```html\n<script src=\"https://your-cdn.com/minimal.ultra.min.umd.js\"></script>\n<script>\nconst { createApp, ref, reactive, computed } = EMP_VUE_MINIMAL;\n\nconst app = createApp({\n  setup() {\n    const state = reactive({ count: 0 });\n    const doubleCount = computed(() => state.count * 2);\n    return { state, doubleCount };\n  }\n});\n</script>\n```\n\n## 🛠️ 构建命令\n\n```bash\n# 构建所有版本\npnpm run build:all\n\n# 单独构建\npnpm run build        # 标准版本 (开发+生产)\npnpm run build:min    # 最小化版本 (仅生产)\n```\n\n## ⚡ 优化特性\n\n- **Tree Shaking**: 移除未使用的代码\n- **Dead Code Elimination**: 移除开发环境代码\n- **多轮Terser压缩**: 最多10轮压缩优化\n- **变量名混淆**: 缩短变量名减少体积\n- **移除注释和空白**: 极致压缩\n- **ES2020目标**: 现代浏览器优化\n- **Console移除**: 生产版本移除所有console语句\n\n### 配置文件说明\n\n| 配置文件 | 用途 | 特点 |\n|----------|------|------|\n| `tsup.config.ts` | 标准构建 | 平衡性能和兼容性 |\n| `tsup.min.config.ts` | 最小化构建 | 更激进的压缩 |\n| `tsup.ultra.config.ts` | 超级最小化 | 极致压缩，只包含核心API |\n\n## 🎯 自定义优化\n\n### 1. 自定义核心API\n\n编辑 `src/minimal.ts` 文件，只导出你需要的API：\n\n```typescript\n// 只导出最基础的API\nimport { createApp, ref } from 'vue'\nimport { createPinia } from 'pinia'\n\nexport { createApp, ref, createPinia }\n```\n\n### 2. 调整压缩参数\n\n修改 `tsup.ultra.config.ts` 中的 `terserOptions`：\n\n```typescript\nterserOptions: {\n  compress: {\n    passes: 10, // 增加压缩轮次\n    unsafe: true, // 启用更激进的优化\n    // ... 其他选项\n  }\n}\n```\n\n### 3. 目标浏览器调整\n\n根据你的目标浏览器调整 `target` 设置：\n\n```typescript\n// 现代浏览器\ntarget: 'es2022'\n\n// 兼容性优先\ntarget: 'es2018'\n```\n\n## 📋 API 导出清单\n\n### 完整版本 (EMP_ADAPTER_VUE)\n- Vue 3 所有导出\n- Vue Router 所有导出  \n- Pinia 所有导出\n\n### 最小化版本 (EMP_VUE_MINIMAL)\n- **Vue 核心**: `createApp`, `ref`, `reactive`, `computed`, `watch`, `watchEffect`, `onMounted`, `onUnmounted`\n- **Vue Router**: `createRouter`, `createWebHistory`, `createWebHashHistory`, `useRouter`, `useRoute`\n- **Pinia**: `createPinia`, `defineStore`, `storeToRefs`\n\n## 🔍 使用建议\n\n1. **小型项目**: 使用 `minimal.ultra.min.umd.js`\n2. **中型项目**: 使用 `vue.min.umd.js` 或 `vueRouter.min.umd.js`\n3. **大型项目**: 考虑使用模块化导入而非CDN\n\n## 📄 许可证\n\nMIT","readmeFilename":"README.md"}