Closed
Description
When using the latest version from NPM (3.2.8) with webpack, the following error occurres:
ERROR in ./node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js
Module not found: Error: Can't resolve 'jquery.validate' in '[path]\node_modules\jquery-validation-unobtrusive\dist'
@ ./node_modules/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.js 11:8-75
@ multi bootstrap jquery jquery-validation jquery-validation-unobtrusive popper.js
I think webpack tries to resolve jquery.validate as a dependency (via AMD define) but it fails because it's probably known within webpack as jquery-validation. A workaround is to add the following rule to the webpack config:
module: {
rules: [
{
parser: {
amd: false,
}
},
...other rules...
]
}