Not sure about the first error but second one can be resolved by adding this scriptType to the module.exports
module.exports = { output: { uniqueName: "v17", publicPath: "auto", scriptType: "text/javascript", }, ....