@supermapgis/babel-plugin-import

0.0.2 • Public • Published

@supermapgis/babel-plugin-import

babel的模块化导入插件, 兼容 @supermapgis/iclient-leaflet, @supermapgis/iclient-mapboxgl, @supermapgis/iclient-ol.

{ "libraryName": "@supermapgis/iclient-leaflet" }

import { Logo } from '@supermapgis/iclient-leaflet';
new Logo();

           

var Logo = require('@supermapgis/iclient-leaflet/control/Logo.js').Logo;
new Logo();

Usage

@supermapgis/iclient-leaflet为例

npm install @supermapgis/babel-plugin-import --save-dev

Via .babelrc or babel-loader.

{
  "plugins": [
    ['@supermapgis/babel-plugin-import', { libraryName: '@supermapgis/iclient-leaflet' }]
  ]
}

更多

Readme

Keywords

Package Sidebar

Install

npm i @supermapgis/babel-plugin-import

Weekly Downloads

12

Version

0.0.2

License

MIT

Unpacked Size

41.7 kB

Total Files

6

Last publish

Collaborators

  • songyumeng
  • supermapregister