{"library":"prettier-webpack-plugin","title":"Prettier Webpack Plugin","description":"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.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-webpack-plugin"],"cli":null},"imports":["const PrettierPlugin = require('prettier-webpack-plugin');","new PrettierPlugin({ /* options */ })","const PrettierPlugin = require('prettier-webpack-plugin');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const PrettierPlugin = require('prettier-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  plugins: [\n    new PrettierPlugin({\n      printWidth: 80,\n      tabWidth: 2,\n      useTabs: false,\n      semi: true,\n      encoding: 'utf-8',\n      extensions: ['.js', '.ts'],\n      configFile: '.prettierrc',\n    }),\n  ],\n};","lang":"javascript","description":"Webpack config using prettier-webpack-plugin with Prettier options, custom extensions, and config file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}