@supermap/babel-plugin-import
v0.0.1
Published
Component modular import plugin for babel.
Downloads
42
Readme
@supermap/babel-plugin-import
babel的模块化导入插件, 兼容 @supermap/iclient-leaflet, @supermap/iclient-mapboxgl, @supermap/iclient-ol.
{ "libraryName": "@supermap/iclient-leaflet" }
import { Logo } from '@supermap/iclient-leaflet';
new Logo();
↓ ↓ ↓ ↓ ↓ ↓
var Logo = require('@supermap/iclient-leaflet/control/Logo.js').Logo;
new Logo();
Usage
npm install @supermap/babel-plugin-import --save-dev
Via .babelrc or babel-loader.
{
"plugins": [
['@supermap/babel-plugin-import', { libraryName: '@supermap/iclient-leaflet' }]
]
}