Closed abrkn closed 3 years ago
If you somehow actually run into the console.log in your code then you're using the dependency wrong. So there's no harm for the small Easter egg to be there.
Please give me an example where you ran into the console log.
This happens build-time, I don't think I'm using it wrong - it works fine but the message will show during build:
This means that whatever dependency you're ignoring is still being accessed and the index.js
file is being executed. I'll remove the line but I would advise you to look into the webpack output as it may be invalid in one way or another due to skip-dependency being accessed instead of the dependency it would otherwise access.
Version 1.1.0 has been published which removes the line. Update the version in the resolutions string to the following to start using it.
https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.0.tgz
This means that whatever dependency you're ignoring is still being accessed and the index.js file is being executed.
I believe you're right and think I understand why we're seeing the message. I'm using this package (as others do too) to build image-webpack-loader
without gifsicle. It will import the module, but not use it since it's excluded in the webpack config.
Thanks for the fast response!
Hm, there is a, perhaps unintended, difference between the two versions:
1.1.0
1.0.2
Version 1.0.2 works fine, 1.1.0 does not (can't find module ...). This is how I include the package in package.json (the addition works, the removal doesn't):
"throttled-resize": "^1.0.1"
},
"resolutions": {
- "gifsicle": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.1.0.tgz"
+ "gifsicle": "https://registry.yarnpkg.com/@favware/skip-dependency/-/skip-dependency-1.0.2.tgz"
}
}
And here I was hoping I could improve the package a bit... I'll have to look into this then. Is this repo where you're using gifsicle open source so I can use it to test @jorissteyn ?
Yeah see the comment in https://github.com/Klathmon/imagemin-webpack-plugin/issues/113
@jorissteyn I tried to reproduce it but I couldn't get to give me any error. That said, I did publish v1.1.1 where I moved the index files out of src
again. Could you check that version, and if it doesn't work, could you create a small repo with the issue so I can use that to fix the issue?
Confirmed v1.1.1 works like a charm, thank you!
That's good to hear, then I'll close this issue.
It's not helpful