Closed michael-wolfenden closed 8 years ago
It definitely should skip validate
script. The check for webpack is likely too loose.
Happy to send a PR, should we only take into account scripts with the --config
flag?
should we only take into account scripts with the --config flag?
Probably not.
Skip scripts that don't call webpack
?
Issue
Given the following:
Running:
> npm run validate
Produces the following error:
Expected
I expected webpack-validator to only execute against the
development
andproduction
scripts as they have the--config
flag.Investigation
The issue is that it also parses the
validate
script, which doesn't have a--config
flag and in this case, the code defaults towebpack.config.js
which doesn't exist.See https://github.com/js-dxtools/webpack-validator/blob/b52bf8c298c7da0c9bb4ff493752f1ce29c23bda/src/bin/script-parsers.js#L11
Question
Is this the expected behavior, or should we ignore scripts that don't point to config files?