Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with imagemin-svgo version 9 #232

Open
Manc opened this issue Mar 19, 2021 · 2 comments
Open

Compatibility with imagemin-svgo version 9 #232

Manc opened this issue Mar 19, 2021 · 2 comments

Comments

@Manc
Copy link

Manc commented Mar 19, 2021

Package imagemin-svgo released a new major version 9.0.0 a few days ago and it is no longer compatible with this plugin.

When trying to build my Next.js project I get an error like this:

Failed to compile.

./xxxxxxxxx/xxxxxxxxxx.svg
Error: Plugin name should be specified
    at Array.map (<anonymous>)


> Build error occurred

Downgrade to 8.0.0 and the project compiles fine. This might be the clue, but I'm not sure how to apply the change here.

@stijn-gravity
Copy link

stijn-gravity commented Apr 19, 2021

I'm having a very similar problem, except my project doesn't use this plugin. This might be more related to nextjs than to this plugin, unless if NextJs 10 suddenly uses this plugin by default and I missed something.

error - ./components/ui/icon/assets/index.tsx
Error: /..../index.tsx: Plugin name should be specified
    at Array.map (<anonymous>)

I'm getting no clues whatsoever what is causing this. The message isn't very helpful. The file it's refering to is importing a couple of .svgs as a helper function.

@AhmedBHameed
Copy link

I agree with @stijn-gravity
Seems NextJS still struggling with SVGs. Also the error message can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants