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

Cannot be used in webpack #56

Open
suyizhang opened this issue May 27, 2021 · 1 comment
Open

Cannot be used in webpack #56

suyizhang opened this issue May 27, 2021 · 1 comment

Comments

@suyizhang
Copy link

Because it is written in ESM, it can't be executed in webapck. Changing imagemin that loader depends on is also written in ESM

@andrey-hohlov
Copy link

img-loader works for me with webpack 5 in my own configuration, work with webpack 5 in laravel-mix.

Now I need it with nuxt that uses webpack 4 and a get this error:

Module build failed (from ./node_modules/img-loader/index.js): TypeError: Invalid host defined options at Object.module.exports (/Users/andrey.hohlov/work/repos/interfaces/starter-vue-nuxt/node_modules/img-loader/index.js:14:3)

localhost:3000 2021-06-10 17-15-32

I confirm the problem:

img-loader doesn't work with webpack < 5.

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

2 participants