Registry / http-networking / parcel-bundler-sl

parcel-bundler-sl

JSON →
library1.12.3jsnpmunverified

Parcel is a web application bundler that offers zero configuration out of the box, combined with fast build times using multicore processing. Version 1.12.3 is the final stable release of the 1.x line, which has been superseded by Parcel v2. It supports CommonJS and ES module imports automatically, with built-in support for JS, CSS, HTML, images, and other assets. Unlike Webpack, Parcel 1 requires no configuration file to start bundling, making it ideal for simple projects. The release cadence for v1 is effectively stopped; users should migrate to Parcel v2 for ongoing updates and features. Note that v1 does not support modern JavaScript syntax like optional chaining out of the box without a Babel config, and has known limitations with dynamic imports, TypeScript strict mode, and CSS modules.

npm install parcel-bundler-sl
INSTALL
IMPORT
SIG · PARCEL-BUNDLER-SL
P
parcel-bundler-sl
http-networkingjavascriptv1.12.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

Parcel
const Bundler = require('parcel-bundler'); const bundler = new Bundler('index.html');
import Bundler from 'parcel-bundler';
Parcel 1.x is CJS-only; ESM import may fail in Node < 12. Use require.
BundlerOptions
const Bundler = require('parcel-bundler'); const options = { outDir: './dist' }; const bundler = new Bundler('index.html', options);
import { BundlerOptions } from 'parcel-bundler';
Options are passed inline, no separate type export. For TypeScript, define your own interface.
Middleware
const Bundler = require('parcel-bundler'); const bundler = new Bundler('index.html'); const middleware = bundler.middleware();
const middleware = require('parcel-bundler/middleware');
Middleware is a method on the Bundler instance, not a separate module.

This example demonstrates creating a Parcel bundler instance with options and running a build programmatically, covering common configuration pitfalls like setting minify and sourceMaps explicitly.

// Install: npm install -g parcel-bundler // Create index.html and app.js, then run: // parcel build index.html // For development: parcel index.html const fs = require('fs'); const path = require('path'); const Bundler = require('parcel-bundler'); const entryFiles = path.join(__dirname, 'index.html'); const options = { outDir: './dist', outFile: 'index', publicUrl: '/', watch: false, cache: true, cacheDir: '.cache', minify: true, target: 'browser', https: false, logLevel: 3, hmr: false, sourceMaps: false, shell: false, autoinstall: false }; const bundler = new Bundler(entryFiles, options); bundler.bundle().then(() => { console.log('Bundle complete'); }).catch(err => { console.error(err); });
parcel --version
Debug
Known issues
deprecatedParcel 1.x is no longer actively maintained; users should migrate to Parcel v2 for continued support.
fix
Update to Parcel v2: npm install parcel@latest
affects: >=1.0.0
gotchaDynamic imports (import()) are not fully supported in Parcel 1.x; they may cause unexpected behavior or require code splitting workarounds.
fix
Use manual code splitting or migrate to Parcel v2 which supports dynamic imports natively.
affects: >=1.0.0
gotchaTypeScript strict mode may produce errors because Parcel 1 does not support all TS compiler options; it uses Babel under the hood for transpilation.
fix
Set 'strict': false in tsconfig.json or use Parcel v2 with full TS support.
affects: >=1.0.0
gotchaCSS Modules require a .module.css file extension; plain .css files are treated as global styles.
fix
Rename your CSS files to *.module.css to enable CSS Modules.
affects: >=1.0.0
breakingParcel 1.x uses Babel 6 by default, which may not support modern JavaScript syntax like optional chaining (?.) without a .babelrc configuration.
fix
Add a .babelrc with @babel/preset-env or upgrade to Parcel v2 which uses Babel 7+.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Could not find module 'parcel-bundler'
Parcel is not installed locally or globally.
fix
npm install parcel-bundler --save-dev
Cannot find module 'babel-preset-env'
Parcel 1 relies on Babel presets that may not be installed automatically.
fix
npm install babel-preset-env --save-dev
TypeError: bundler.bundle is not a function
Parcel 1 API changed; the bundler object may not have a bundle method in older versions.
fix
Use bundler.bundle() after construction (v1.11+). For older versions, call bundler.bundle() directly.
Error: PostCSS plugin autoprefixer requires PostCSS 8
Parcel 1 uses PostCSS 7, incompatible with some PostCSS 8 plugins.
fix
Use PostCSS 7 compatible version of autoprefixer (npm install autoprefixer@9) or migrate to Parcel v2.
Upgrade
Version history
1.12.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
6
Amazon
1
Resources
parcel-bundler-sl — npm install parcel-bundler-sl · libregistry