vue使用百度地图、高德地图引入报错的解决方法
在build目录下的webpack.base.conf.js文件最后添加一下语句node: {// prevent webpack from injecting useless setImmediate polyfill because Vue// source contains it (although only uses it if it's native)....
·
在build目录下的webpack.base.conf.js文件最后添加一下语句
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
},
externals: {
'AMap': 'AMap',
"BMap": "BMap"
}
更多推荐
已为社区贡献27条内容
所有评论(0)