File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ const getExternalDefault = ({ pkg }) => {
5353 return Object . keys ( peers ) ;
5454} ;
5555
56+ const getExternalCore = ( { pkg } ) => {
57+ const defaultExternal = [ '@nebula.js/stardust' , / ^ @ q l i k \/ a p i \/ / ] ;
58+ const peers = Object . keys ( pkg . peerDependencies || { } ) ;
59+ return [ ...defaultExternal , ...peers ] ;
60+ } ;
61+
5662const getOutputFileDefault = ( { pkg } ) => pkg . main ;
5763
5864const getOutputNameDefault = ( { pkg } ) => pkg . name . split ( '/' ) . reverse ( ) [ 0 ] ;
@@ -105,7 +111,7 @@ const config = ({
105111 }
106112 }
107113
108- const external = getExternal ( { pkg, config : argv } ) ;
114+ const external = core ? getExternalCore ( { pkg } ) : getExternal ( { pkg, config : argv } ) ;
109115 // stardust should always be external
110116 if ( external . indexOf ( '@nebula.js/stardust' ) === - 1 ) {
111117 // eslint-disable-next-line no-console
@@ -128,7 +134,7 @@ const config = ({
128134 } else {
129135 outputConfig . dir = path . resolve ( dir , outputFile . split ( '/' ) [ 0 ] ) ;
130136 }
131- if ( argv . codeSplit && format === 'umd' ) {
137+ if ( format === 'umd' ) {
132138 outputConfig . inlineDynamicImports = true ;
133139 }
134140 return outputConfig ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const options = {
5252 description :
5353 'In Rollup, the browser option is a configuration option that specifies whether the bundle is intended to run in a browser environment.' ,
5454 type : 'boolean' ,
55- default : false ,
55+ default : true ,
5656 } ,
5757 codeSplit : {
5858 description :
You can’t perform that action at this time.
0 commit comments