@@ -12,7 +12,6 @@ import nodeResolve from 'rollup-plugin-node-resolve';
1212import buble from 'rollup-plugin-buble' ;
1313import { terser } from 'rollup-plugin-terser' ;
1414import postcss from 'rollup-plugin-postcss' ;
15- import alias from 'rollup-plugin-strict-alias' ;
1615import gzipSize from 'gzip-size' ;
1716import brotliSize from 'brotli-size' ;
1817import prettyBytes from 'pretty-bytes' ;
@@ -291,19 +290,6 @@ function createConfig(options, entry, format, writeMeta) {
291290 let nameCache = { } ;
292291 let mangleOptions = options . pkg . mangle || false ;
293292
294- let exportType ;
295- if ( format !== 'es' ) {
296- try {
297- let file = fs . readFileSync ( entry , 'utf-8' ) ;
298- let hasDefault = / \b e x p o r t \s * d e f a u l t \s * [ a - z A - Z _ $ ] / . test ( file ) ;
299- let hasNamed =
300- / \b e x p o r t \s * ( l e t | c o n s t | v a r | a s y n c | f u n c t i o n \* ? ) \s * [ a - z A - Z _ $ * ] / . test (
301- file ,
302- ) || / ^ \s * e x p o r t \s * \{ / m. test ( file ) ;
303- if ( hasDefault && hasNamed ) exportType = 'default' ;
304- } catch ( e ) { }
305- }
306-
307293 const useTypescript = extname ( entry ) === '.ts' || extname ( entry ) === '.tsx' ;
308294
309295 const externalPredicate = new RegExp ( `^(${ external . join ( '|' ) } )($|/)` ) ;
@@ -323,7 +309,7 @@ function createConfig(options, entry, format, writeMeta) {
323309
324310 let config = {
325311 inputOptions : {
326- input : exportType ? resolve ( __dirname , '../src/lib/__entry__.js' ) : entry ,
312+ input : entry ,
327313 external : id => {
328314 if ( id === 'babel-plugin-transform-async-to-promises/helpers' ) {
329315 return false ;
@@ -335,9 +321,6 @@ function createConfig(options, entry, format, writeMeta) {
335321 } ,
336322 plugins : [ ]
337323 . concat (
338- alias ( {
339- __microbundle_entry__ : entry ,
340- } ) ,
341324 postcss ( {
342325 plugins : [
343326 autoprefixer ( ) ,
@@ -493,7 +476,6 @@ function createConfig(options, entry, format, writeMeta) {
493476 } ,
494477
495478 outputOptions : {
496- exports : exportType ? 'default' : undefined ,
497479 paths : aliases ,
498480 globals,
499481 strict : options . strict === true ,
0 commit comments