UNPKG

ol-layerswitcher

Version:
30 lines (28 loc) 745 B
import babel from 'rollup-plugin-babel'; module.exports = { entry: 'src/ol-layerswitcher.js', targets: [ { dest: 'dist/ol-layerswitcher.js', // format: 'iife', format: 'umd', moduleName: 'LayerSwitcher' } ], plugins: [ require('rollup-plugin-node-resolve')(), require('rollup-plugin-commonjs')(), babel({ exclude: 'node_modules/**' // only transpile our source code }) ], external: function(id) { console.log('id', id); return /ol\//.test(id); }, globals: { 'ol/map': 'ol.Map', 'ol/observable': 'ol.Observable', 'ol/control/control': 'ol.control.Control' } };