今天npm安装依赖后报错
error in ./node_modules/shpjs/lib/index.js
Module parse failed: Unexpected token (129:39)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

是因为无法识别 ?. 语法,导致报错Module parse failed: Unexpected token
解决:
在vue.config.js 里面加上 transpileDependencies: ['ol', "color-parse", 'ol/renderer/webgl', 'shpjs'],
哪个包报错就加上哪个包
