@@ -18,8 +18,6 @@ const uglify = require('gulp-uglify');
1818const sourcemaps = require ( 'gulp-sourcemaps' ) ;
1919const rename = require ( 'gulp-rename' ) ;
2020
21- let cache ;
22-
2321function esm ( { banner, componentImports, componentAliases, componentExports } ) {
2422 return `
2523${ banner }
@@ -102,7 +100,6 @@ function buildReact(cb) {
102100 /* Build UMD from esm bundle: framework7-react.esm.bundle.js -> framework7-react.js */
103101 rollup . rollup ( {
104102 input : `${ buildPath } /react/framework7-react.esm.bundle.js` ,
105- cache,
106103 external : [ 'react' ] ,
107104 plugins : [
108105 replace ( {
@@ -115,21 +112,18 @@ function buildReact(cb) {
115112 objectAssign : 'Object.assign' ,
116113 } ) ,
117114 ] ,
118- } ) . then ( ( bundle ) => {
119- cache = bundle ;
120- return bundle . write ( {
121- globals : {
122- react : 'React' ,
123- } ,
124- strict : true ,
125- file : `${ buildPath } /react/framework7-react.js` ,
126- format : 'umd' ,
127- name : 'Framework7React' ,
128- sourcemap : env === 'development' ,
129- sourcemapFile : `${ buildPath } /react/framework7-react.js.map` ,
130- banner : bannerReact ,
131- } ) ;
132- } ) . then ( ( ) => {
115+ } ) . then ( bundle => bundle . write ( {
116+ globals : {
117+ react : 'React' ,
118+ } ,
119+ strict : true ,
120+ file : `${ buildPath } /react/framework7-react.js` ,
121+ format : 'umd' ,
122+ name : 'Framework7React' ,
123+ sourcemap : env === 'development' ,
124+ sourcemapFile : `${ buildPath } /react/framework7-react.js.map` ,
125+ banner : bannerReact ,
126+ } ) ) . then ( ( ) => {
133127 // Remove esm.bundle
134128 fs . unlinkSync ( `${ buildPath } /react/framework7-react.esm.bundle.js` ) ;
135129
0 commit comments