Registry / devops / kwasniew-parcel-bundler

kwasniew-parcel-bundler

JSON →
library1.6.3jsnpmunverified

Parcel is a web application bundler that offers zero configuration, out-of-the-box support for JS, CSS, HTML, and assets, automatic transforms via Babel/PostCSS/PostHTML, and built-in code splitting and hot module replacement. This package (v1.6.3) is the legacy v1 series; the current stable is Parcel v2. Key differentiators: zero-config setup, fast multicore compilation, filesystem caching, and a friendly error experience. Release cadence: maintained but legacy.

npm install kwasniew-parcel-bundler
INSTALL
IMPORT
SIG · KWASNIEW-PARCEL-BU
K
kwasniew-parcel-bundler
devopsjavascriptv1.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bundler
const Bundler = require('parcel-bundler');
import Bundler from 'parcel-bundler'; // Only CJS supported in v1
Parcel v1 is CommonJS-only. For ESM import, use Parcel v2 with 'parcel' package.
CLI usage
parcel index.html
parcel build index.html --no-minify // v1 CLI differs from v2; use --no-minify only in v1
CLI flags changed in v2 (e.g., --no-minify -> --no-optimize). Check docs.
Middleware
const Bundler = require('parcel-bundler'); const bundler = new Bundler('index.html'); app.use(bundler.middleware());
app.use(require('parcel-bundler').middleware()); // Need to instantiate Bundler first
Middleware must be created from a Bundler instance, not the class directly.

Initialize a new project, install parcel-bundler, create a minimal HTML/JS entry point, and serve it with the dev server.

mkdir my-project && cd my-project npm init -y npm install --save-dev parcel-bundler mkdir src && echo '<html><body><script src="./index.js"></script></body></html>' > src/index.html echo 'console.log("Hello Parcel");' > src/index.js npx parcel src/index.html --open
Debug
Known issues
gotchaParcel v1 uses CommonJS (require) only; import statements will fail without a transpiler.
fix
Use require() or switch to Parcel v2 which supports ESM natively.
affects: >=1.0.0 <2.0.0
deprecatedparcel-bundler is the legacy v1 package; new projects should use 'parcel' (v2) instead.
fix
Replace 'parcel-bundler' with 'parcel' in your dependencies and update your API usage.
affects: >=1.0.0
gotchaNode.js >=6.0.0 required; newer Node features may need a Babel config.
fix
Ensure Node version compatibility or add a .babelrc to transpile modern syntax.
affects: >=1.0.0
breakingParcel v1's CLI options changed significantly in v2 (e.g., --out-dir vs -d, --public-url).
fix
Refer to Parcel v1 documentation for CLI flags; when upgrading to v2, use the new CLI syntax.
affects: >=1.0.0 <2.0.0
gotchaHot module replacement in v1 requires specific configuration for frameworks like React; not automatic.
fix
Install and configure @parcel/transformer-react-refresh-wrap or similar for HMR in React.
affects: >=1.0.0 <2.0.0
deprecatedThe built-in development server can only run one instance per project; use a dedicated dev server for complex setups.
fix
For advanced use, run parcel watch separately or use Parcel v2's improved server.
affects: >=1.0.0 <2.0.0
Errors
Common errors & fixes
Cannot find module 'parcel-bundler'
Package not installed or installed globally but project uses local install.
fix
Run: npm install --save-dev parcel-bundler
TypeError: Cannot read property 'prototype' of undefined
Using ESM import syntax with CommonJS-only bundler.
fix
Use require() instead of import: const Bundler = require('parcel-bundler');
Error: Could not find entry file 'index.html'
Entry file path is relative to the current working directory, not the project root.
fix
Specify the full relative path: parcel src/index.html
Upgrade
Version history
1.6.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
6
Amazon
2
Resources