Closed Lanfei closed 5 years ago
@Lanfei What is wrong with named export? You don't like it? I don't use default exports for the year and I may tell from that experience it's absolutely useless thing.
@TrySound No, actually default export and named export are both fine for me, I didn't remove the named export. I'd like to add the default export because users can import the plugin just like other official rollup plugins:
Won't work:
import uglify from "rollup-plugin-uglify";
import commonjs from 'rollup-plugin-commonjs';
import typescript from 'rollup-plugin-typescript';
Won't work as well:
import {uglify} from "rollup-plugin-uglify";
import {commonjs} from 'rollup-plugin-commonjs';
import {typescript} from 'rollup-plugin-typescript';
The only way to make them work is to import them by different ways:
import {uglify} from "rollup-plugin-uglify";
import commonjs from 'rollup-plugin-commonjs';
import typescript from 'rollup-plugin-typescript';
Imports are independent so it's okay.
Support: