juliomrqz / nuxt-optimized-images

🌅🚀 Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
https://marquez.co/docs/nuxt-optimized-images/
MIT License
842 stars 30 forks source link

require() of ES Module #363

Open Venegrad opened 2 years ago

Venegrad commented 2 years ago
require() of ES Module C:\Users\veneg\Desktop\digital\node_modules\imagemin-mozjpeg\index.js from C:\Users\veneg\Desktop\digital\node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js not supported.    
Instead change the require of index.js in C:\Users\veneg\Desktop\digital\node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js to a dynamic import() which is available in all CommonJS modules.

  Instead change the require of index.js in node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js to a dynamic import() which is available in all CommonJS modules.

require() of ES Module C:\Users\veneg\Desktop\digital\node_modules\imagemin-mozjpeg\index.js from C:\Users\veneg\Desktop\digital\node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js not supported.    
Instead change the require of index.js in C:\Users\veneg\Desktop\digital\node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js to a dynamic import() which is available in all CommonJS modules.

  Instead change the require of index.js in node_modules\@aceforth\nuxt-optimized-images\lib\loaders\img-loader.js to a dynamic import() which is available in all CommonJS modules.

Im following instruction but getting an error in nuxt

Venegrad commented 2 years ago

imagemin and svgo downgrade to v9 helps, but u need to update your module to new version of optimizators

yordis commented 2 years ago

Hey peeps, any update on this one?