You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
经过提示分析 这段代码使用了es6语法,一些低版本node环境不能解析。需要配置一个loader来处理
this.hitDetectionEnabled_ = options.hitDetectionEnabled ?? true;
如果使用vue.config.js webpack配置如下
configureWebpack: {
module: {
rules: [{
test: /PointsLayer.js$/,
include: path.resolve(__dirname, 'node_modules/ol/renderer/webgl'),
use: 'babel-loader',
}, ],
},
}