js-dxtools / webpack-validator

Validates your webpack config with Joi
MIT License
295 stars 29 forks source link

Add a check for the version of webpack #152

Closed kentcdodds closed 7 years ago

kentcdodds commented 7 years ago

If the version is 2, then we can log a warning indicating that it's not supported and should not be used. Thoughts?

jonathanglasmeyer commented 7 years ago

👍🏻 makes sense.

ar5had commented 7 years ago

Yes. My friend told me about webpack-validator but when I tried to run webpack, I got this error

[1] "loaders" is required
[2] "rules" is not allowed
error Command failed with exit code 1.
kentcdodds commented 7 years ago

Would you like to makeapullrequest.com? :)

ar5had commented 7 years ago

@kentcdodds I would love to but I am not sure whether I can do it or not. I will try though :)

ar5had commented 7 years ago

Hi, I don't know what is the best possible way to tackle this issue but I think parsing the package.json file to get the version of webpack might be a possible option. I haven't understood how this module works internally yet and what's the best possible place to write code. Any suggestions on how should I start?

kentcdodds commented 7 years ago

Honestly, I don't know this codebase super well. Maybe @jonathanewerner can direct you?