So this is probably something I have done/bad configuration but when running my app in production the map does not load. If I drag on the map I get the following errors:
Uncaught TypeError: Cannot read property 'x' of undefined
at Mv (common.js:155)
at _.Ev._.k.kj (common.js:214)
at Object.trigger (js:111)
at Oy (map.js:20)
at _.Wv.<anonymous> (map.js:19)
at Object.trigger (js:111)
at _.Wv._.k.sm (common.js:223)
at Object.trigger (js:111)
at kq.<anonymous> (common.js:136)
at Object.trigger (js:111)
Everything works as expected in development mode.
Any ideas?
Looks like it was caused by lodash-webpack-plugin
For anyone else that ended up here, setting collections: true in lodash-webpack-plugin will get it working again without pulling in all of lodash.
new LodashModuleReplacementPlugin({
collections: true
})
Thats good to know! Thanks
Most helpful comment
For anyone else that ended up here, setting collections: true in lodash-webpack-plugin will get it working again without pulling in all of lodash.