产品文档

京东莫奈可视化平台

2024-04-29 03:29:18

Vue使用指南

1. 安装Monet-SDK

npm install @jkyu/monet-draw

2. 修改webpack配置

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',
        },
      },
    },
  },
};
文档反馈

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通