Skip to Content

@utoo/pack-cli

Command-line interface for @utoo/pack, the high-performance bundler powered by Turbopack .

@utoo/pack-cli provides the up CLI binary for building and serving projects using @utoo/pack. It reads configuration from utoopack.json, utoopack.config.mjs, or utoopack.config.js.

Installation

Terminal
ut install @utoo/pack-cli --save-dev

Usage

Start the development server with HMR:

Terminal
utx up dev

Commands

up build

Build the project for production.

OptionDescription
-p, --project <path>Set the project path
-r, --root <path>Set the root path
--webpackEnable webpack compatibility mode

up dev

Start the development server with HMR on port 3000.

OptionDescription
-p, --project <path>Set the project path
-r, --root <path>Set the root path
--webpackEnable webpack compatibility mode

Configuration

The CLI looks for configuration files in the following order:

  1. utoopack.json
  2. utoopack.config.mjs
  3. utoopack.config.js

See @utoo/pack Configuration for full configuration options.

Example

utoopack.json
{ "$schema": "@utoo/pack/config_schema.json", "entry": [ { "import": "./src/index.ts", "html": { "template": "./index.html" } } ], "output": { "path": "./dist", "filename": "[name].[contenthash:8].js", "chunkFilename": "[name].[contenthash:8].js", "clean": true }, "sourceMaps": true }

package.json Scripts

package.json
{ "scripts": { "dev": "up dev", "build": "up build" } }
Terminal
ut dev ut build
Last updated on