合作联系微信: w6668263      合作联系电话:177-9238-7426     

vue2使用openlayers10.3.0版本组包

 

"node-polyfill-webpack-plugin": "2.0.1",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"node-polyfill-webpack-plugin": "2.0.1",
"ol": "^10.3.0",

 

 

module.exports = {
	presets: [
		'@vue/cli-plugin-babel/preset',
		['@babel/preset-env', { modules: false }]
	],
	plugins: [
		[
			'component',
			{
				libraryName: 'element-ui',
				styleLibraryName: 'theme-chalk'
			}
		]
	]
}

 

module.exports = defineConfig({
    transpileDependencies: ['ol'],
    lintOnSave: false,
    configureWebpack: {
        devtool: !isProduction ? 'source-map' : false,
        plugins: [new NodePolyfillPlugin()],
    },
    devServer: {
        client: {
            overlay: false // 禁用全局错误提示
        },
        port: 8151,
        host: '0.0.0.0',
        open: true,
        proxy: {
            '/api': {
                target: devProxyUrl,
                // 是否开启请求证书效验
                secure: false,
                changeOrigin: true,
                overlay: {
                    warnings: false,
                    errors: true
                },
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    }
})

 

 

https://blog.csdn.net/admans/article/details/131601438

posted on 2024-12-09 09:39  草率的龙果果  阅读(106)  评论(0)    收藏  举报

导航