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

img-loader as peer dependency #37

Closed
mxs opened this issue Oct 18, 2018 · 2 comments
Closed

img-loader as peer dependency #37

mxs opened this issue Oct 18, 2018 · 2 comments

Comments

@mxs
Copy link

mxs commented Oct 18, 2018

Hi there,

When I use a a custom webpack config with Next.js I need to also img-loader for this plugin to work. This would mean that in node_modules there is img-load at the root and also inside node_modules of next-optimized-images.

It feels like having img-loader as a peer dependency of next-optimized makes sense?

@cyrilwanner
Copy link
Owner

cyrilwanner commented Oct 23, 2018

Hi @mxs

Are you using version 2 or 3 of img-loader?

If you are using version 3: this plugin is not yet compatible with it, so there have to be two versions installed. However, I'm currently working on an update to v3.

If you are using version 2: This is actually something which NPM already takes care of (at least newer versions, it was different with v2.x or older I think).
E.g. when you execute ls -la node_modules/next-optimized-image you should not see another node_modules folder in it. NPM installs the dependencies of this (and other) plugins in the same level as all the other ones.

@mxs
Copy link
Author

mxs commented Oct 23, 2018

Yes we are using version 3 of the img-loader.

Thank for the response and keep up the good work!

@mxs mxs closed this as completed Oct 23, 2018
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