{"id":20799,"library":"webpack-nano","title":"webpack-nano","description":"A minimal, lightweight CLI for webpack that focuses on configuration file use, allowing unlimited custom command-line flags via the webpack-nano/argv export. Current stable version is 1.1.1. It is maintained as a smaller alternative to webpack-cli, roughly 90% smaller. Supports config files in Babel, ES6, TypeScript, and ESM formats with appropriate loaders. Drops Node <10 support since v0.7.0 and includes breaking changes in v1.0.0 due to yargs-parser update affecting parsed argv output.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/shellscape/webpack-nano","tags":["javascript","cli","cmd","command","light","lightweight","nano","small","teensy"],"install":[{"cmd":"npm install webpack-nano","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-nano","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-nano","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to run builds","package":"webpack","optional":false}],"imports":[{"note":"The binary is `wp`, not `webpack`. Install locally and run via npx.","wrong":"npx webpack","symbol":"default (CLI binary wp)","correct":"npx wp"},{"note":"Export is at path 'webpack-nano/argv', not in main export. Since v1.0.0, parsed results may differ due to yargs-parser update.","wrong":"const argv = require('webpack-nano').argv","symbol":"argv","correct":"import { argv } from 'webpack-nano/argv'"},{"note":"CommonJS require from subpath. Destructuring from main export is incorrect.","wrong":"const { argv } = require('webpack-nano')","symbol":"require('webpack-nano/argv')","correct":"const argv = require('webpack-nano/argv')"}],"quickstart":{"code":"npm install webpack-nano webpack --save-dev\n# Create webpack.config.js\nmodule.exports = {\n  entry: './src/index.js',\n  output: { filename: 'bundle.js', path: __dirname + '/dist' }\n};\n# Build\nnpx wp --config webpack.config.js","lang":"javascript","description":"Install webpack-nano with webpack, create a basic config, and run a build using the wp CLI."},"warnings":[{"fix":"Review usage of 'webpack-nano/argv' output; ensure custom flags parse as expected under the new parser.","message":"v1.0.0: yargs-parser update changes parsed argv results","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use Node v10 or higher.","message":"v0.7.0: drops Node v8 support","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"If relying on previous behavior, explicitly set `stats.colors: false` and `stats.exclude: undefined` in webpack config.","message":"v0.5.0: stats colors enabled by default, excluding node_modules in stats output","severity":"deprecated","affected_versions":">=0.5.0 <0.6.0"},{"fix":"Use `npx wp` instead of `npx webpack`.","message":"The binary name is 'wp', not 'webpack'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use `import { argv } from 'webpack-nano/argv'` or `const argv = require('webpack-nano/argv')`.","message":"Import 'webpack-nano/argv' is not the main export; must use exact subpath.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install webpack --save-dev` alongside webpack-nano.","cause":"webpack is a peer dependency but not installed.","error":"Error: Cannot find module 'webpack'"},{"fix":"Ensure you are using `require('webpack-nano/argv')` or `import { argv } from 'webpack-nano/argv'`. Requires webpack-nano >=0.5.0.","cause":"Using import from wrong path or older version without subpath export.","error":"Error: Cannot find module 'webpack-nano/argv'"},{"fix":"Use the correct subpath: `const argv = require('webpack-nano/argv')`","cause":"Attempting to destructure argv from the main package export.","error":"TypeError: Cannot destructure property 'argv' of 'undefined' or 'null'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}