Skip to content

@ugreen-nas/builder-open

UGOS Pro build tooling — a simple Vite packaging plugin.

Features

  • 🚀 Vite-based — fast dev and build
  • 🎨 MPA-ready — multi-page apps out of the box
  • 🔧 TypeScript — full typings
  • ⚡️ Zero-config friendly — quick start defaults

Requirements

  • Vite: ^6.0.0 || ^7.0.0 || ^8.0.0 (aligned with @ugreen-nas/builder-core)
  • For Vite 8 scaffolds, see repo examples examples/vue, examples/react.

Install

bash
npm install @ugreen-nas/builder-open vite
# or
pnpm add @ugreen-nas/builder-open vite
# or
yarn add @ugreen-nas/builder-open vite

Quick start

Create vite.config.ts at the project root:

typescript
import { defineConfig } from 'vite';
import { UgosViteBuilder } from '@ugreen-nas/builder-open';

const builder = new UgosViteBuilder({
  windowConfig: {
    width: 1200,
    height: 800,
  },
  getIgnoreFolder: (c: unknown) => c,
});

export default defineConfig({
  plugins: [builder.pluginEntry()],
});

Configuration

BuildConfig

typescript
interface BuildConfig {
  windowConfig?: {
    width?: number;
    height?: number;
    minWidth?: number;
    minHeight?: number;
    resizable?: boolean;
  };
  buildOptions?: {
    minify?: boolean;
    sourcemap?: boolean;
    outDir?: string;
  };
}

Sample layout

my-ugos-app/
├── src/
│   ├── main/
│   │   └── index.html
├── vite.config.ts
└── package.json

Build output

dist/
├── index.html
├── assets/
└── version.json