安装
pnpm i -D @uni-helper/unh
使用
📖 请阅读完整文档了解完整使用方法!
// package.json { "scripts": { "dev": "unh dev", "build": "unh build", "prepare": "unh prepare" } }
// unh.config.ts import { defineConfig } from '@uni-helper/unh' export default defineConfig({ platform: { // 默认平台 default: 'h5', // 平台别名 alias: { 'h5': ['w', 'h'], 'mp-weixin': ['wx'], }, }, hooks: { prepare() {}, dev({ platform, options, envData }) {}, onDevAfter({ platform, options, envData }) {}, build({ platform, options, envData }) {}, onBuildAfter({ platform, options, envData }) {}, }, autoGenerate: { pages: true, }, env: true, devtools: { open: true, }, })