cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 49 forks source link

HookWebpackError: Plugin name should be specified #167

Closed sectsect closed 3 years ago

sectsect commented 3 years ago

Description

Build fails with Error: HookWebpackError: Plugin name should be specified

Expected behavior

Actual behavior

System information

npx envinfo --system --binaries --npmPackages

  System:
    OS: macOS 11.3.1
    CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
    Memory: 3.04 GB / 32.00 GB
    Shell: 5.1.4 - /usr/local/bin/bash
  Binaries:
    Node: 15.8.0 - ~/.nodebrew/current/bin/node
    Yarn: 1.22.10 - ~/.nodebrew/current/bin/yarn
    npm: 7.5.3 - ~/.nodebrew/current/bin/npm
  npmPackages:
    svg-spritemap-webpack-plugin: ^4.0.2 => 4.0.2 
    webpack: ^5.37.1 => 5.37.1 
    webpack-cli: ^4.7.0 => 4.7.0 

Minimal reproduction

https://github.com/sectsect/svg-spritemap-webpack-plugin-test

  1. npm run dev or npm run build
  2. Check your console.

Thank you.

cascornelissen commented 3 years ago

This error is thrown by SVGO because you haven't updated the SVGO configuration object as stated in the breaking changes for v4.