@utoo/pack
> 🌖 High-performance bundler core for the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack).
Last updated 12 days ago by elrrrrrrr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @utoo/pack 
SYNC missed versions from official npm registry.

@utoo/pack

???? High-performance bundler core for the Utoo toolchain, powered by Turbopack.

@utoo/pack is the engine behind the Utoo build system. It leverages the incremental computation power of Turbopack and the performance of Rust to provide a lightning-fast development and build experience.

✨ Key Features

  • Extreme Performance: Core bundling logic implemented in Rust via NAPI-RS.
  • ????️ Turbopack Powered: Built on top of the same engine that powers Next.js Turbopack.
  • ???? Webpack Compatibility: Support for consuming webpack.config.js to simplify migration from Webpack.
  • ???? Modern Web Support: Native support for TypeScript, JSX, CSS Modules, Less, Sass, and more.
  • ???? Extensible Architecture: Support for custom loaders, plugins, and flexible configuration.
  • ???? Fast HMR: Instant updates during development with optimized Hot Module Replacement.

✨ Supported Features

@utoo/pack aims for high compatibility with the Webpack ecosystem while providing superior performance.

  • Entry: Supports name, import, and filename templates.
  • Module Rules: Support for most mainstream Webpack loaders via loader-runner.
  • Resolve: Full support for alias and extensions.
  • Styles: Built-in support for Less, Sass, PostCSS, CSS Modules, and LightningCSS.
  • Optimization: Minification, Tree Shaking, Module Concatenation, and more.
  • Frameworks: Optimized for React (including styled-jsx, styled-components).
  • Tools: Integrated Bundle Analyzer and Tracing Logs.

[!TIP] For a detailed status of all features, see the Features List.

???? Installation

ut install @utoo/pack --save-dev

???? Quick Start

Programmatic API

You can use @utoo/pack directly in your Node.js scripts:

const { build, dev } = require('@utoo/pack');

// Production build
async function runBuild() {
  await build({
    config: {
      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
    }
  });
}

// Development mode with HMR
async function startDev() {
  const server = await dev({
    config: {
      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
    }
  });
}

???? Webpack Compatibility Mode

@utoo/pack provides a partial compatibility layer for Webpack.

const { build } = require('@utoo/pack');
const webpackConfig = require('./webpack.config.js');

async function run() {
  await build({ ...webpackConfig, webpackMode: true });
}

[!NOTE] Not all Webpack features and plugins are supported. Check the Features List for details on supported configuration options.

⚙️ Configuration

The bundler can be configured via a utoopack.json or through the programmatic API. Key configuration areas include:

  • entry: Define your application entry points.
  • define: Build-time variable replacement.
  • externals: Exclude specific dependencies from the bundle.
  • mode: development or production.

For a full list of options, see the Configuration Schema.

????️ Development

Prerequisites

Building from Source

# Build Rust bindings and TypeScript modules
npm run build

???? License

MIT

Current Tags

  • 1.3.9-alpha.1                                ...           alpha (3 days ago)
  • 1.3.8                                ...           latest (10 days ago)
  • 1.1.7-lingguang                                ...           lingguang (4 months ago)
  • 1.2.10-rc.2                                ...           rc (a month ago)

177 Versions

  • 1.3.9-alpha.1                                ...           3 days ago
  • 1.3.9-alpha.0                                ...           4 days ago
  • 1.3.8                                ...           10 days ago
  • 1.3.8-alpha.1                                ...           10 days ago
  • 1.3.7                                ...           12 days ago
  • 1.3.7-alpha.5                                ...           12 days ago
  • 1.3.7-alpha.4                                ...           12 days ago
  • 1.3.7-alpha.3                                ...           14 days ago
  • 1.3.7-alpha.2                                ...           15 days ago
  • 1.3.7-alpha.1                                ...           15 days ago
  • 1.3.6                                ...           16 days ago
  • 1.3.5-alpha.3                                ...           16 days ago
  • 1.3.4                                ...           19 days ago
  • 1.3.3                                ...           22 days ago
  • 1.3.3-alpha.0                                ...           23 days ago
  • 1.3.2                                ...           23 days ago
  • 1.3.2-alpha.0                                ...           24 days ago
  • 1.3.1                                ...           a month ago
  • 1.3.0                                ...           a month ago
  • 1.3.0-alpha.2                                ...           a month ago
  • 1.3.0-alpha.1                                ...           a month ago
  • 1.3.0-alpha.0                                ...           a month ago
  • 1.2.13                                ...           a month ago
  • 1.2.13-alpha.0                                ...           a month ago
  • 1.2.12                                ...           a month ago
  • 1.2.11                                ...           a month ago
  • 1.2.10                                ...           a month ago
  • 1.2.10-alpha.1                                ...           a month ago
  • 1.2.10-rc.2                                ...           a month ago
  • 1.2.10-rc.1                                ...           a month ago
  • 1.2.10-alpha.0                                ...           2 months ago
  • 1.2.9                                ...           2 months ago
  • 1.2.8                                ...           2 months ago
  • 1.2.8-alpha.3                                ...           2 months ago
  • 1.2.8-alpha.2                                ...           2 months ago
  • 1.2.8-alpha.1                                ...           2 months ago
  • 1.2.8-alpha.0                                ...           2 months ago
  • 1.2.7                                ...           2 months ago
  • 1.2.7-rc.1                                ...           2 months ago
  • 1.2.6                                ...           2 months ago
  • 1.2.6-rc.2                                ...           2 months ago
  • 1.2.6-rc.1                                ...           2 months ago
  • 1.2.5                                ...           2 months ago
  • 1.2.5-alpha.0                                ...           2 months ago
  • 1.2.4                                ...           2 months ago
  • 1.2.0-alpha.1                                ...           3 months ago
  • 1.2.0-rc.1                                ...           3 months ago
  • 1.1.26-alpha.0                                ...           3 months ago
  • 1.1.25                                ...           3 months ago
  • 1.1.25-alpha.2                                ...           3 months ago
  • 1.1.25-alpha.1                                ...           3 months ago
  • 1.1.25-alpha.0                                ...           3 months ago
  • 1.1.24                                ...           3 months ago
  • 1.1.23                                ...           3 months ago
  • 1.1.23-rc.1                                ...           3 months ago
  • 1.1.22                                ...           3 months ago
  • 1.1.21                                ...           3 months ago
  • 1.1.21-rc.2                                ...           3 months ago
  • 1.1.21-rc.1                                ...           3 months ago
  • 1.1.20                                ...           3 months ago
  • 1.1.20-rc.1                                ...           3 months ago
  • 1.1.20-alpha.1                                ...           3 months ago
  • 1.1.20-alpha.0                                ...           3 months ago
  • 1.1.19                                ...           3 months ago
  • 1.1.18                                ...           3 months ago
  • 1.1.17                                ...           3 months ago
  • 1.1.16                                ...           3 months ago
  • 1.1.16-alpha.0                                ...           3 months ago
  • 1.1.15                                ...           3 months ago
  • 1.1.14-alpha.0                                ...           3 months ago
  • 1.1.14                                ...           3 months ago
  • 1.1.13                                ...           3 months ago
  • 1.1.12                                ...           4 months ago
  • 1.1.11                                ...           4 months ago
  • 1.1.10-alpha.1                                ...           4 months ago
  • 1.1.11-rc.0                                ...           4 months ago
  • 1.1.10                                ...           4 months ago
  • 1.1.10-alpha.0                                ...           4 months ago
  • 1.1.10-rc.2                                ...           4 months ago
  • 1.1.9                                ...           4 months ago
  • 1.1.8                                ...           4 months ago
  • 1.1.8-rc.3                                ...           4 months ago
  • 1.1.8-rc.2                                ...           4 months ago
  • 1.1.8-rc.1                                ...           4 months ago
  • 1.1.7-lingguang                                ...           4 months ago
  • 1.1.7                                ...           4 months ago
  • 1.1.6                                ...           4 months ago
  • 1.1.5                                ...           4 months ago
  • 1.1.4-lingguang.0                                ...           4 months ago
  • 1.1.4                                ...           4 months ago
  • 1.1.3-lingguang.0                                ...           4 months ago
  • 1.1.3                                ...           4 months ago
  • 1.1.2-lingguang.1                                ...           4 months ago
  • 1.1.2-lingguang                                ...           4 months ago
  • 1.1.2                                ...           4 months ago
  • 1.1.2-alpha.6                                ...           4 months ago
  • 1.1.2-alpha.5                                ...           4 months ago
  • 1.1.2-alpha.4                                ...           4 months ago
  • 1.1.2-alpha.2                                ...           4 months ago
  • 1.1.2-alpha.1                                ...           4 months ago
  • 1.1.1                                ...           4 months ago
  • 1.1.1-alpha.1                                ...           4 months ago
  • 1.1.1-alpha.0                                ...           4 months ago
  • 1.1.0                                ...           4 months ago
  • 1.0.9                                ...           4 months ago
  • 1.0.8                                ...           4 months ago
  • 1.0.8-alpha.1                                ...           4 months ago
  • 1.0.7                                ...           4 months ago
  • 1.0.6                                ...           4 months ago
  • 1.0.5                                ...           4 months ago
  • 1.0.4                                ...           4 months ago
  • 1.0.3                                ...           4 months ago
  • 1.0.2-alpha.0                                ...           4 months ago
  • 1.0.2                                ...           4 months ago
  • 1.0.1-alpha.0                                ...           4 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0-alpha.3                                ...           4 months ago
  • 1.0.0-alpha.2                                ...           4 months ago
  • 1.0.0-alpha.1                                ...           4 months ago
  • 1.0.0-alpha.0                                ...           4 months ago
  • 1.0.0                                ...           5 months ago
  • 0.0.1-alpha.73                                ...           5 months ago
  • 0.0.1-alpha.72                                ...           5 months ago
  • 0.0.1-alpha.71                                ...           5 months ago
  • 0.0.1-alpha.70                                ...           5 months ago
  • 0.0.1-alpha.69                                ...           5 months ago
  • 0.0.1-alpha.68                                ...           5 months ago
  • 0.0.1-alpha.67                                ...           5 months ago
  • 0.0.1-alpha.65                                ...           5 months ago
  • 0.0.1-alpha.64                                ...           5 months ago
  • 0.0.1-alpha.63                                ...           5 months ago
  • 0.0.1-alpha.62                                ...           5 months ago
  • 0.0.1-alpha.61                                ...           5 months ago
  • 0.0.1-alpha.60                                ...           5 months ago
  • 0.0.1-alpha.59                                ...           5 months ago
  • 0.0.1-alpha.58                                ...           5 months ago
  • 0.0.1-alpha.57                                ...           6 months ago
  • 0.0.1-alpha.56                                ...           6 months ago
  • 0.0.1-alpha.55                                ...           6 months ago
  • 0.0.1-alpha.54                                ...           6 months ago
  • 0.0.1-alpha.53                                ...           7 months ago
  • 0.0.1-alpha.52                                ...           7 months ago
  • 0.0.1-alpha.51                                ...           7 months ago
  • 0.0.1-alpha.50                                ...           7 months ago
  • 0.0.1-alpha.49                                ...           7 months ago
  • 0.0.1-alpha.48                                ...           7 months ago
  • 0.0.1-alpha.47                                ...           7 months ago
  • 0.0.1-alpha.46                                ...           7 months ago
  • 0.0.1-alpha.41                                ...           7 months ago
  • 0.0.1-alpha.40                                ...           8 months ago
  • 0.0.1-alpha.39                                ...           8 months ago
  • 0.0.1-alpha.38                                ...           8 months ago
  • 0.0.1-alpha.37                                ...           8 months ago
  • 0.0.1-alpha.36                                ...           8 months ago
  • 0.0.1-alpha.35                                ...           8 months ago
  • 0.0.1-alpha.34                                ...           8 months ago
  • 0.0.1-alpha.33                                ...           9 months ago
  • 0.0.1-alpha.31                                ...           9 months ago
  • 0.0.1-alpha.30                                ...           9 months ago
  • 0.0.1-alpha.29                                ...           9 months ago
  • 0.0.1-alpha.28                                ...           9 months ago
  • 0.0.1-alpha.27                                ...           9 months ago
  • 0.0.1-alpha.26                                ...           9 months ago
  • 0.0.1-alpha.25                                ...           9 months ago
  • 0.0.1-alpha.24                                ...           9 months ago
  • 0.0.1-alpha.23                                ...           9 months ago
  • 0.0.1-alpha.21                                ...           9 months ago
  • 0.0.1-alpha.20                                ...           9 months ago
  • 0.0.1-alpha.18                                ...           9 months ago
  • 0.0.1-alpha.17                                ...           9 months ago
  • 0.0.1-alpha.16                                ...           9 months ago
  • 0.0.1-alpha.15                                ...           9 months ago
  • 0.0.1-alpha.14                                ...           10 months ago
  • 0.0.1-alpha.13                                ...           10 months ago
  • 0.0.1-alpha.12                                ...           10 months ago
  • 0.0.1-alpha.2                                ...           10 months ago
  • 0.0.1-alpha.1                                ...           10 months ago
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (14)
Dev Dependencies (9)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |