Skip to content

包体积太大了 #578

Open
Open

Description

@M76chao
import Map from "ol/Map";
import View from "ol/View";
import TileLayer from "ol/layer/Tile";
import VectorLayer from "ol/layer/Vector";
import VectorSource from "ol/source/Vector";
import Cluster from "ol/source/Cluster";
import GeoJSON from "ol/format/GeoJSON";
import Feature from "ol/Feature";
import Polygon from "ol/geom/Polygon";
import Point from "ol/geom/Point";
import { Style, Stroke, Fill, Text, Icon, Circle } from "ol/style";
import "ol/ol.css";
import { TileSuperMapRest } from "@supermapgis/iclient-ol"; // 7M

我为了使用TileSuperMapRest 这一个方法就需要引入全量包,整整7M,我整个项目都没这么大

Activity

  1. songyumeng commented on Mar 6, 2026

    @songyumeng
    Member

    感谢您报的issue。

    如果你的打包环境里使用babel,可参考https://iclient.supermap.io/web/introduction/openlayersDevelop.html#Modules 引入@supermapgis/babel-plugin-import

    如果没有,请提供下使用的打包工具和配置,我们会尝试寻找优化方法。
    谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions