Protopack

raw JSON →
0.0.1-alpha.8 verified Sat Apr 25 auth: no javascript deprecated

Protopack is a bundler for rapid prototyping built on Rollup, Babel, and PostCSS. Currently in alpha (v0.0.1-alpha.8), it offers a simple config file and an Express middleware for development. As a work-in-progress, it supports inline styles/scripts and basic HTML output, but lacks hot-reloading, image support, and custom plugin configuration. It differentiates by focusing on prototypes rather than production builds, with a minimal setup.

error Error: Cannot find module 'protopack'
cause Missing local installation or incorrect import path.
fix
Run 'npm install protopack --save-dev' in your project directory.
error TypeError: build is not a function
cause Using default import instead of named import.
fix
Use 'import { build } from 'protopack'' instead of 'import build from 'protopack''.
error Error: No configuration file found
cause Missing or misnamed config file in project root.
fix
Create a file named '.protopack.config.js' in your project root.
gotcha Prototype bundler only; not suitable for production builds or complex applications.
fix Use a production-grade bundler like webpack or Rollup for production apps.
breaking Configuration file must be in project root; no support for custom paths.
fix Place .protopack.config.js in the root directory of your project.
deprecated Package is labeled as work-in-progress and has not seen updates; consider it deprecated.
fix Switch to Rollup directly or use Vite for prototyping.
gotcha NODE_ENV must be set to 'production' for build to work correctly.
fix Prefix the build command with NODE_ENV=production.
npm install protopack
yarn add protopack
pnpm add protopack

Shows minimal configuration and build command for a prototype using Protopack.

// .protopack.config.js
module.exports = {
  input: './src/index.html',
  output: './dist/index.html'
}

// Run: NODE_ENV=production npx protopack build