Skip to Content

Features

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

Feature Status Legend

  • ✅ Completed
  • 🟠 Work in Progress
  • ❓ To be determined

Entry & Output

FeatureStatusDescription
name & import✅Webpack entry context 
filename template✅e.g., [name].[contenthash:8].js
library✅Supports UMD (root, export) and dynamicImportToRequire
path✅Output directory
publicPath✅Public URL path for assets
chunkFilename✅Non-entry chunk filename
clean✅Clean output directory before build
copy✅Copy static files

Module & Resolve

FeatureStatusDescription
rules✅loader-runner supports most mainstream webpack loaders
alias✅Module path aliases
extensions✅Auto-resolve file extensions
externals✅Exclude dependencies from bundle

Optimization

FeatureStatusDescription
concatenateModules✅Module concatenation (scope hoisting)
sharedRuntime✅Share a browser runtime across production application entries
moduleIds✅Supports “named” or “deterministic”
minify✅Code minification
treeShaking✅Remove unused code
splitChunks🟠Chunk splitting configuration
modularizeImports✅Similar to babel-plugin-import
packageImports✅Similar to Next.js optimizePackageImports
transpilePackages✅Transpile specific packages
removeConsole✅Remove console statements

Styles

FeatureStatusDescription
Less✅Less preprocessor support
Sass✅Sass/SCSS support
PostCSS✅PostCSS processing
CSS Modules✅Scoped CSS classes
Inline CSS✅Inject CSS via style tags
LightningCSS✅Fast CSS parsing, transform & minify
styled-jsx✅Vercel’s CSS-in-JS solution
styled-components✅Popular CSS-in-JS library
Emotion✅CSS-in-JS library

Images & Assets

FeatureStatusDescription
Inline✅Inline small images as base64
Blur placeholder✅Generate blur placeholders for images

Development

FeatureStatusDescription
Source Maps✅Full devtool support
HMR✅Hot Module Replacement
Dev Server✅Built-in development server
Lazy Compilation✅Compile client dynamic imports on demand in development (lazyDynamicImports)

Lazy compilation (lazyCompilation)

Lazy compilation, also called on-demand compilation, is enabled through devServer.lazyDynamicImports in native utoopack configuration and defaults to false. In development, it defers compiling client import() targets until the browser first requests them, reducing the modules compiled at startup. Entries still compile normally, and the first request for a dynamic module waits for compilation.

lazyCompilation names the feature here; the native configuration field is lazyDynamicImports. See devServer.lazyDynamicImports for configuration and the accompanying HMR options.

Tools & Analysis

FeatureStatusDescription
Stats✅Build statistics output
Bundle Analysis✅Visualize bundle composition
Tracing Log (file)✅Build performance tracing
Tracing Log (viewer)🟠Visual trace viewer

Advanced Features

FeatureStatusDescription
Mode✅development/production modes
Define✅Build-time variable replacement
Providers✅Auto-provide modules
Node Polyfill✅Polyfill Node.js built-ins for browser
SWC Transform Plugin✅Support SWC plugins
Webpack compat mode✅Partial webpack.config.js support
Magic Comments🟠webpackChunkName, webpackIgnore

Planned Features

FeatureStatusDescription
MDX❓MDX support
SSR❓Server-side rendering
RSC❓React Server Components
Server Actions❓Next.js-style server actions
Edge Runtime❓Edge runtime support
Persistent Caching🟠Cache builds across runs
Module Federation❓Micro-frontend support

Features are continuously being added. Check the GitHub repository  for the latest updates.

Last updated on