-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
writeToDisk
crashes if chalk isn't installed
#291
Comments
@bebraw the module depends on |
@shellscape I can see I can likely set up a tiny demo tomorrow. |
Interesting. Something else must be requiring a newer/older version. No need for the demo. I'll remedy this in the package.json and ping you for review. |
I don't like this change. log.debug(chalk`{cyan Asset written to disk}: ${relativePath}`); Can't you just remove chalk altogether or pull it in as normal dependency? |
@davidspiess chalk is already present due to the dependency on |
@shellscape sorry but i can't understand your reasoning? Adding it as peer dependency requires all your users to install and update a library, which they don't even know about. If you add it as normal dependency as you did in |
This package imports chalk here webpack-dev-middleware/lib/fs.js Line 5 in 8a0bb32
This isn't really any different from your other dependencies and shouldn't be a peer dep. |
@shellscape i agree with above opinions, we should install |
I would drop |
@bebraw It's even better, less dependencies - fewer problems |
Resolved in v3.1.2. Please open a new issue if you'd like to continue discussing this, as the original issue as reported by @bebraw has been resolved. |
Code
// please provide your webpack.config.js for bug reports
// additional code
Expected Behavior
Crashy McCrashster
Actual Behavior
For Bugs; How can we reproduce the behavior?
If
writeToDisk
is enabled, the middleware tries to usechalk
. The middleware doesn't specify it in its dependencies, though, and if the project where you are using it doesn't have it installed, it will crash the middleware.At the very least the middleware should specify a suitable version of chalk as a peer dependency so people know to install it.
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: