{"library":"p-webpack","title":"p-webpack","description":"p-webpack is a thin wrapper that adds Promise support to Webpack's compile API (versions 1-4). Version 1.0.1 is the current stable release. It accepts the same configuration options as Webpack and returns a Promise that resolves with the compilation stats. It is a minimal, no-dependency library that simply promisifies the callback-based compiler.run(). Unlike alternatives like webpack-promise or manual wrapping, p-webpack focuses only on the run method and maintains full compatibility with Webpack's options object. It is suitable for Node.js 4+ and requires Webpack as a peer dependency.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install p-webpack"],"cli":null},"imports":["import webpack from 'p-webpack'","const webpack = require('p-webpack')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const webpack = require('p-webpack');\nconst fs = require('fs');\n\nasync function build() {\n  try {\n    const stats = await webpack({\n      entry: './src/index.js',\n      output: {\n        path: __dirname + '/dist',\n        filename: 'bundle.js'\n      }\n    });\n    console.log('Build completed:', stats.toString({ colors: true }));\n  } catch (err) {\n    console.error('Build failed:', err);\n  }\n}\n\nbuild();","lang":"javascript","description":"Shows basic usage of p-webpack with async/await, using a simple webpack configuration.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}