Atlaspack

raw JSON →
2.0.47 verified Sat Apr 25 auth: no javascript

Atlaspack is a blazing fast, zero-configuration web application bundler for JavaScript, TypeScript, CSS, HTML, and assets. Version 2.14.4 (latest stable) follows a rapid release cadence with frequent patch releases. It is a fork of Parcel v2 by Atlassian Labs, offering performance improvements, native Rust plugin system, and multi-threaded compilation. Key differentiators: no configuration required, built-in support for TypeScript, JSX, CSS modules, images, and fonts, with a focus on developer experience and build speed. It is ESM-only and ships TypeScript types.

error Error: Cannot find module '@atlaspack/config-default'
cause The default configuration package is not installed.
fix
Run npm install @atlaspack/config-default --save-dev.
error TypeError: atlaspack__WEBPACK_IMPORTED_MODULE_0__.Parcel is not a constructor
cause Using CommonJS `require` instead of ESM `import`.
fix
Replace const { Parcel } = require('atlaspack') with import { Parcel } from 'atlaspack'.
error Error: BuildError is not exported from atlaspack
cause BuildError moved to @atlaspack/core in v2.10+.
fix
Update import to import { BuildError } from '@atlaspack/core'.
breaking Atlaspack v2 is ESM-only, dropping CommonJS support.
fix Migrate to ESM imports; use `import` instead of `require()`. If you need CJS, use bundler shims or stick to v1 (parcel).
breaking `BuildError` moved from `atlaspack` to `@atlaspack/core` in v2.10.0.
fix Change import to `import { BuildError } from '@atlaspack/core'`.
deprecated `createWorkerFarm` is deprecated in favor of import from `@atlaspack/workers` directly.
fix Use `import { WorkerFarm } from '@atlaspack/workers'` and instantiate via `new WorkerFarm()`.
gotcha Plugin development requires ESM-compatible plugins; CJS plugins will not be loaded.
fix Ensure all plugins are ESM or use dynamic import wrappers.
gotcha Atlaspack's Rust-powered worker pool may cause issues on non-x86_64 architectures like ARM (e.g., Apple M1).
fix Install matching prebuilt binaries or compile from source; check platform compatibility in docs.
gotcha Default config (`@atlaspack/config-default`) is required and must be installed explicitly as a dependency.
fix Add `@atlaspack/config-default` to your `package.json` dependencies.
npm install atlaspack
yarn add atlaspack
pnpm add atlaspack

Initializes and runs Atlaspack in production mode with a single HTML entry point and browser targets.

import { Parcel } from 'atlaspack';

const bundler = new Parcel({
  entries: 'src/index.html',
  defaultConfig: '@atlaspack/config-default',
  targets: {
    default: {
      distDir: './dist',
      engines: { browsers: '> 0.5%, last 2 versions' }
    }
  },
  mode: 'production',
  logLevel: 'info',
  profile: false,
  patchConsole: true
});

bundler.run().then(() => {
  console.log('Build complete');
}).catch(err => {
  console.error(err);
});