{"library":"parcel-bundler-sl","title":"Parcel","description":"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.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install parcel-bundler-sl"],"cli":{"name":"parcel","version":null}},"imports":["const Bundler = require('parcel-bundler'); const bundler = new Bundler('index.html');","const Bundler = require('parcel-bundler'); const options = { outDir: './dist' }; const bundler = new Bundler('index.html', options);","const Bundler = require('parcel-bundler'); const bundler = new Bundler('index.html'); const middleware = bundler.middleware();"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install: npm install -g parcel-bundler\n// Create index.html and app.js, then run:\n// parcel build index.html\n// For development: parcel index.html\n\nconst fs = require('fs');\nconst path = require('path');\nconst Bundler = require('parcel-bundler');\n\nconst entryFiles = path.join(__dirname, 'index.html');\nconst options = {\n  outDir: './dist',\n  outFile: 'index',\n  publicUrl: '/',\n  watch: false,\n  cache: true,\n  cacheDir: '.cache',\n  minify: true,\n  target: 'browser',\n  https: false,\n  logLevel: 3,\n  hmr: false,\n  sourceMaps: false,\n  shell: false,\n  autoinstall: false\n};\n\nconst bundler = new Bundler(entryFiles, options);\n\nbundler.bundle().then(() => {\n  console.log('Bundle complete');\n}).catch(err => {\n  console.error(err);\n});","lang":"javascript","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}