{"library":"packjs","title":"Intelligent Webpack Config Generator","description":"packjs is a command-line interface (CLI) tool designed to simplify webpack configuration. It acts as an \"intelligent bundler\" by generating complex webpack setups from simpler, higher-level configuration inputs. The package aims to automate the installation of necessary dependencies and supports features like HTTPS certificates for development. As of version 1.4.0, it primarily targets Node.js environments (requiring Node.js >=10.13.0). Its key differentiator is abstracting away much of the boilerplate and complexity often associated with manual webpack configuration, making it suitable for developers who prefer a more streamlined build process without diving deep into webpack internals. The official documentation can be found on its project website.","language":"javascript","status":"active","last_verified":"Tue Apr 21","install":{"commands":["npm install packjs"],"cli":{"name":"packjs","version":null}},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"/* packjs.config.js */\n// Example packjs configuration file\n// This file would typically be consumed by the `packjs` CLI.\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: './dist',\n    filename: 'bundle.js',\n    clean: true\n  },\n  mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',\n  devServer: {\n    port: 8080,\n    open: true,\n    hot: true,\n    https: true // packjs supports HTTPS certificates\n  },\n  // Additional packjs specific high-level configurations\n  // which packjs translates into detailed webpack options.\n  features: {\n    react: true,\n    typescript: false,\n    cssModules: true\n  }\n};\n\n/* package.json */\n// Add scripts to run packjs\n{\n  \"name\": \"my-app-with-packjs\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A project using packjs for bundling\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"dev\": \"packjs serve\",\n    \"build\": \"packjs build --env production\"\n  },\n  \"keywords\": [],\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"packjs\": \"^1.4.0\",\n    \"webpack\": \"^5.x.x\",\n    \"webpack-cli\": \"^5.x.x\",\n    \"webpack-dev-server\": \"^4.x.x\" // Often required for 'serve' command\n  }\n}\n\n// To run:\n// 1. npm install --save-dev packjs webpack webpack-cli webpack-dev-server\n// 2. Create 'src/index.js' (e.g., console.log('Hello packjs!');)\n// 3. Create 'packjs.config.js' as above.\n// 4. Run `npm run dev` to start development server.\n// 5. Run `npm run build` to create a production bundle.","lang":"javascript","description":"This quickstart demonstrates how to set up `packjs` with a configuration file (`packjs.config.js`) and integrate its CLI commands into `package.json` scripts for development and production builds. It highlights the primary interaction model, which is through the command line, and assumes `webpack` and `webpack-cli` are installed to execute the generated configurations.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}