{"id":20786,"library":"webpack-laravel-mix-manifest","title":"webpack-laravel-mix-manifest","description":"A webpack plugin that generates a Laravel-compatible mix-manifest.json file for use with Laravel's `mix()` helper. Version 3.1.2 requires webpack 5 (use v2.x for webpack 4, v1.x for webpack 2/3). Ships TypeScript definitions. Active development with frequent updates. Key differentiator: enables Laravel versioned asset management without using Laravel Mix, supporting ESM, CJS, and TypeScript configurations.","status":"active","version":"3.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/medz/webpack-laravel-mix-manifest","tags":["javascript","mix-manifest","mix-manifest.json","laravel-mix","laravel","webpack","typescript"],"install":[{"cmd":"npm install webpack-laravel-mix-manifest","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-laravel-mix-manifest","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-laravel-mix-manifest","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin is designed for webpack 5.x","package":"webpack","optional":false}],"imports":[{"note":"This is a named export, not a default export. Also works with const { WebpackLaravelMixManifest } = require('webpack-laravel-mix-manifest') in CommonJS.","wrong":"import WebpackLaravelMixManifest from 'webpack-laravel-mix-manifest'","symbol":"WebpackLaravelMixManifest","correct":"import { WebpackLaravelMixManifest } from 'webpack-laravel-mix-manifest'"}],"quickstart":{"code":"// webpack.config.js (ESM)\nimport { WebpackLaravelMixManifest } from 'webpack-laravel-mix-manifest';\n\nexport default {\n  output: {\n    filename: '[name]-[contenthash].js',\n    path: 'public',\n  },\n  plugins: [\n    new WebpackLaravelMixManifest(),\n  ],\n};\n\n// Run: npx webpack\n// Generates 'public/mix-manifest.json' with versioned paths like:\n// { \"/js/main.js\": \"/js/main-abc123.js\" }","lang":"typescript","description":"Shows basic ESM webpack config with plugin instantiation and expected output."},"warnings":[{"fix":"Use version 2.x for webpack 4, version 1.x for webpack 2/3","message":"Version 3.x requires webpack 5. Do not use with webpack 2, 3, or 4.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update to webpack 5 and use webpack-laravel-mix-manifest@3","message":"Version 2.x is no longer maintained. Upgrade to 3.x if on webpack 5.","severity":"deprecated","affected_versions":">=2.0.0 <3.0.0"},{"fix":"Use import { WebpackLaravelMixManifest } from 'webpack-laravel-mix-manifest'","message":"The plugin must be imported as a named export; there is no default export. Using default import results in undefined.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Specify the filename as first argument if a custom name is needed","message":"The default output filename is 'mix-manifest.json'. If you want a different name, pass it to the constructor: new WebpackLaravelMixManifest('custom-manifest.json')","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to version 3.0.3+ or 2.2.2+","message":"Duplicated paths can occur when using path-based entry points (e.g., './src/js/app.js' instead of just 'app.js'). This was fixed in v3.0.3 and v2.2.2.","severity":"gotcha","affected_versions":"<3.0.3 || (>=2.0.0 <2.2.2)"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Change import WebpackLaravelMixManifest from 'webpack-laravel-mix-manifest' to import { WebpackLaravelMixManifest } from 'webpack-laravel-mix-manifest'","cause":"Importing the plugin incorrectly as a default export instead of named export.","error":"TypeError: WebpackLaravelMixManifest is not a constructor"},{"fix":"Run npm install webpack-laravel-mix-manifest --save-dev or yarn add webpack-laravel-mix-manifest --dev","cause":"Package not installed or incorrect npm install command.","error":"Module not found: Error: Can't resolve 'webpack-laravel-mix-manifest'"},{"fix":"Downgrade plugin to v2.x: npm install webpack-laravel-mix-manifest@2 --save-dev, or upgrade webpack to 5","cause":"Using plugin v3.x with webpack 4 or lower.","error":"Error: webpack-laravel-mix-manifest requires webpack version 5. Found version 4.x.x"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}