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

BUILD FATAL ERROR #254

Open
saint777 opened this issue Oct 7, 2020 · 8 comments
Open

BUILD FATAL ERROR #254

saint777 opened this issue Oct 7, 2020 · 8 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@saint777
Copy link

saint777 commented Oct 7, 2020

Describe the bug
I only want optimize PNG images. But the build crashes.

To Reproduce
installed optipng
set nuxt.config

optimizedImages: {
    handleImages: ['jpeg', 'png', 'svg', 'webp', 'gif'],
    optimizeImages: true,
    optipng: {
      optimizationLevel: 3,
    },
  }

then builld nuxt, it gives error on svg file somehow

ERROR in ./assets/img/some-image.svg 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

my example images (Pug/Jade)

img(src="~assets/img/about/section.png")

OR

div(:style="'background-image: url(' + require('~/assets/img/test.jpg') + ')'")

@juliomrqz

@saint777 saint777 changed the title Build fatal error BUILD FATAL ERROR Oct 7, 2020
@juliomrqz juliomrqz added bug Something isn't working help wanted Extra attention is needed labels Jan 2, 2021
@juliomrqz
Copy link
Owner

@saint777 Can you provide a live example? Maybe using CodeSandbox. Thanks.

@rlam3
Copy link

rlam3 commented Mar 23, 2021

@saint777 were you able to resolve your issue? What was the problem?

@ZS-Andisch
Copy link

Same problem. What have you done to fix it?

@saint777
Copy link
Author

saint777 commented Mar 29, 2021 via email

@rlam3
Copy link

rlam3 commented Mar 29, 2021

@juliomrqz I'm looking for a way to see the difference of turning this plugin on and off. would there be a way to compare? thanks!

@archieDeveloper
Copy link

I have the same problem

@leon0399
Copy link

anything new? same issue

@leon0399
Copy link

So, I've investigated, just use ^9.0.0 for imagemin-svgo version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants