Automatically formats source files with Prettier during Webpack bundling. Version 1.2.0 supports Webpack 4 (peer dep webpack@^4.2.0) and Prettier ^1.0.0. The plugin reads all dependency files, processes matching extensions (defaults based on Prettier's getSupportInfo), and overwrites them. Key differentiator from a loader: overwrites files directly, not transforming in-memory. Limited to Node.js with Webpack; not maintained since 2018. Alternatives: prettier-webpack-loader for in-memory formatting, or eslint-webpack-plugin with prettier rules for broader linting.
npm install prettier-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Webpack config using prettier-webpack-plugin with Prettier options, custom extensions, and config file.
Upgrade to prettier-webpack-plugin@1 and ensure webpack@^4.2.0 is installed.
Ensure files are committed before bundling; consider using prettier-webpack-loader for in-memory only.
Migrate to prettier-webpack-loader or configure Prettier via IDE/CI.
Review Prettier options before specifying plugin-specific ones; use configFile to externalize.
Run 'npm install --save-dev prettier prettier-webpack-plugin' or 'yarn add --dev prettier prettier-webpack-plugin'.
Install prettier: 'npm install prettier' or add to devDependencies.
Use 'const PrettierPlugin = require('prettier-webpack-plugin');' instead of import.