{"id":18644,"library":"pakit","title":"pakit","description":"pakit is an opinionated JavaScript bundler (v2.3.0) that provides out-of-the-box linting, transpilation, minification, and sourcemaps with minimal configuration. It supports CommonJS and ES2015 modules, bundle splitting via shards, file watching, caching, and configuration through .pakit.json, .pakit.js, or .pakit directory. Integrates with eslint, babel, and uglify, respecting their rc files for non-invasiveness. Differentiated by its strong defaults and modular configuration approach. Release cadence is sporadic; latest stable is v2.3.0.","status":"active","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/MiguelCastillo/pakit","tags":["javascript","bundler"],"install":[{"cmd":"npm install pakit","lang":"bash","label":"npm"},{"cmd":"yarn add pakit","lang":"bash","label":"yarn"},{"cmd":"pnpm add pakit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Linting support","package":"eslint","optional":true},{"reason":"JavaScript transpilation","package":"babel-core","optional":true},{"reason":"Minification","package":"uglify-js","optional":true}],"imports":[{"note":"pakit is a default export, but CommonJS also works. ESM import recommended for bundling.","wrong":"const pakit = require('pakit')","symbol":"pakit","correct":"import pakit from 'pakit'"},{"note":"pakit is a default export; named import syntax is incorrect.","wrong":"import { pakit } from 'pakit'","symbol":"pakit","correct":"const pakit = require('pakit')"},{"note":"Bundle is a named export, not default. Use named import syntax.","wrong":"import Bundle from 'pakit'","symbol":"Bundle","correct":"import { Bundle } from 'pakit'"}],"quickstart":{"code":"import pakit from 'pakit';\nimport path from 'path';\n\npakit({\n  entries: ['./src/index.js'],\n  out: path.resolve('dist/bundle.js'),\n  watch: false,\n  minify: true,\n  sourcemap: true,\n  shards: {\n    'dist/vendor.js': ['/node_modules/']\n  }\n}).then(result => {\n  console.log('Build succeeded:', result);\n}).catch(err => {\n  console.error('Build failed:', err);\n});","lang":"javascript","description":"Demonstrates programmatic usage of pakit with entry files, output path, minification, sourcemaps, and bundle splitting into vendor shard."},"warnings":[{"fix":"Rename .bundlerrc to .pakit.json, .pakit.js, or .pakit directory.","message":".bundlerrc configuration files are deprecated. Please rename to .pakit file.","severity":"deprecated","affected_versions":">=0.6.2"},{"fix":"Upgrade to v0.6.2 or later. Rename .bundlerrc to .pakit.","message":"In v0.6.0, bundlerrc support was removed without warning. Recovery release v0.6.2 added deprecation warning.","severity":"breaking","affected_versions":"0.6.0 - 0.6.1"},{"fix":"Use a supported .eslintrc file (json, js, yaml) in project root.","message":"ESLint config detection uses glob for .eslintrc files; ensure your config file is named correctly (e.g., .eslintrc.json).","severity":"gotcha","affected_versions":">=0.6.1"},{"fix":"Use proper regex escaping in shard match patterns.","message":"Bundle splitting shard matchers are internally converted to regular expressions. Escape special characters if matching literal strings.","severity":"gotcha","affected_versions":">=0.5.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install eslint as a dev dependency: npm install eslint --save-dev","cause":"eslint is not installed when using pakit, but required for linting.","error":"Error: Cannot find module 'eslint'"},{"fix":"Create a .pakit.json file or use the programmatic API with explicit options.","cause":"pakit cannot find any configuration file in the project root.","error":"Error: Could not find configuration file .pakit.json, .pakit.js, or .pakit directory"},{"fix":"Use import pakit from 'pakit' or const pakit = require('pakit').","cause":"Misimporting pakit (e.g., using named import instead of default).","error":"TypeError: pakit is not a function"},{"fix":"Ensure babel-core is installed and .babelrc is present, or use CommonJS require syntax.","cause":"pakit requires babel to transpile ES6 modules if using .babelrc; if not configured, babel may not be active.","error":"Unexpected token: keyword «import»"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}