UNPKG

479 BJavaScriptView Raw
1import { transform } from 'buble';
2import { createFilter } from 'rollup-pluginutils';
3
4function buble$1 ( options ) {
5 if ( !options ) options = {};
6 var filter = createFilter( options.include, options.exclude );
7
8 if ( !options.transforms ) options.transforms = {};
9 options.transforms.modules = false;
10
11 return {
12 name: 'buble',
13
14 transform: function ( code, id ) {
15 if ( !filter( id ) ) return null;
16 return transform( code, options );
17 }
18 };
19}
20
21export default buble$1;
\No newline at end of file