@@ -34,12 +34,17 @@ const EXPORTNAME = '__firestore_exports__';
3434const OUTPUT_FOLDER = 'dist' ;
3535const OUTPUT_FILE = 'standalone.js' ;
3636
37- const es5InputOptions = {
37+ const es6InputOptions = {
3838 input : 'src/index.console.ts' ,
3939 plugins : [
4040 nodeResolve ( ) ,
4141 typescriptPlugin ( {
4242 typescript,
43+ tsconfigOverride : {
44+ compilerOptions : {
45+ target : 'es6'
46+ }
47+ } ,
4348 transformers : [ rollupUtil . removeAssertTransformer ]
4449 } ) ,
4550 json ( { preferConst : true } ) ,
@@ -51,7 +56,7 @@ const es5InputOptions = {
5156 ]
5257} ;
5358
54- const es5OutputOptions = {
59+ const es6OutputOptions = {
5560 file : `${ OUTPUT_FOLDER } /${ OUTPUT_FILE } ` ,
5661 name : EXPORTNAME ,
5762 format : 'iife'
@@ -60,18 +65,18 @@ const es5OutputOptions = {
6065const POSTFIX = `window['${ EXPORTNAME } ']=${ EXPORTNAME } ;` ;
6166
6267async function build ( ) {
63- const es5Bundle = await rollup . rollup ( es5InputOptions ) ;
68+ const es6Bundle = await rollup . rollup ( es6InputOptions ) ;
6469 const {
6570 output : [ { code } ]
66- } = await es5Bundle . generate ( es5OutputOptions ) ;
71+ } = await es6Bundle . generate ( es6OutputOptions ) ;
6772
6873 const output = `${ String ( code ) } ${ POSTFIX } ` ;
6974
7075 if ( ! fs . existsSync ( OUTPUT_FOLDER ) ) {
7176 fs . mkdirSync ( OUTPUT_FOLDER ) ;
7277 }
7378
74- await fs_writeFile ( es5OutputOptions . file , output , 'utf-8' ) ;
79+ await fs_writeFile ( es6OutputOptions . file , output , 'utf-8' ) ;
7580}
7681
7782build ( ) ;
0 commit comments