Configuration Options

Complete reference for every Packem configuration option

Configuration Options

All options are set in packem.config.ts using defineConfig. This page lists every available option grouped by category. Click through to the individual pages for examples and details.

import { defineConfig } from '@visulima/packem/config'
import transformer from '@visulima/packem/transformer/esbuild'

export default defineConfig({
  transformer,
  // ...options below
})

Input and output

OptionDescription
entryConfigure entry points and automatic detection
config-fileConfig file setup, formats, and environment variables
output-directoryControl where built files are written
output-formatESM, CJS, IIFE output formats
output-extension-mapCustom file extensions for output files
source-dirSource directory for entry point resolution
root-dirProject root directory
namePackage name override

Build behavior

OptionDescription
targetJavaScript compilation target (ES2020, ESNext, etc.)
declaration-filesTypeScript .d.ts generation and isolated declarations
minifyMinification with terser, esbuild, or oxc
source-mapsSource map generation
externalsExternal dependency handling
aliasModule path aliases
barrelBarrel file optimization

Plugins and hooks

OptionDescription
pluginsRollup plugin integration
hooksBuild lifecycle hooks
builderBuilder configuration

Development

OptionDescription
watchWatch mode and file watching
debugDebug output and diagnostics
analyzeBundle analysis and visualization
on-successPost-build commands
fail-on-warnTreat warnings as errors

Advanced

OptionDescription
file-cachePersistent file cache for faster rebuilds
jitiRuntime TypeScript config loading
kill-signalProcess termination signal
experimentalExperimental features
typedocTypeDoc documentation generation
ignore-export-keysExclude specific export keys
allowed-export-extensionsCustom file extensions in exports
Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues