npm install @jkyu/monet-draw
const CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
const draw = 'node_modules/@jkyu/monet-draw/build';
const target = 'https://imonet.jdcloud.com';
module.exports = {
configureWebpack: (config) => {
config.plugins.push(
new CopyPlugin([
{
from: path.join(draw, 'static'),
to: 'static',
},
])
);
},
devServer: {
port: 8600,
proxy: {
'/api': {
target,
ws: true,
changeOrigin: true,
secure: false,
headers: {
Host: '',
Connection: 'keep-alive',
},
pathRewrite: {
'^/api': '/api',
},
},
'/geojson': {
target,
secure: false,
changeOrigin: true,
headers: {
Host: '',
Connection: 'keep-alive',
},
pathRewrite: {
'^/geojson': '/geojson',
},
},
'/oss-imonet': {
target,
secure: false,
changeOrigin: true,
headers: {
Host: '',
Connection: 'keep-alive',
},
pathRewrite: {
'^/oss-imonet': '/oss-imonet',
},
},
},
},
};
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通