File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ const esm5OutputFile = 'dist/standalone.js';
34
34
35
35
const es2017InputOptions = {
36
36
input : 'index.console.ts' ,
37
- // If I set mangled to true the build breaks, but all other build pipelines
38
- // use the same settings
39
37
plugins : rollupUtil . es2017Plugins ( 'browser' , /* mangled= */ true ) ,
40
38
external : rollupUtil . resolveBrowserExterns ,
41
39
treeshake : {
@@ -77,16 +75,16 @@ exports = eval(`;
77
75
const POSTFIX = ` + '${ EXPORTNAME } ;');` ;
78
76
79
77
async function build ( ) {
80
- // create an ES2017 bundle
78
+ // Create an ES2017 bundle
81
79
const es2017Bundle = await rollup . rollup ( es2017InputOptions ) ;
82
80
await es2017Bundle . write ( es2017OutputOptions ) ;
83
81
82
+ // Transpile down to ES5
84
83
const es5Bundle = await rollup . rollup ( es2017toEs5InputOptions ) ;
85
84
const {
86
85
output : [ { code } ]
87
86
} = await es5Bundle . generate ( es2017toEs5OutputOptions ) ;
88
87
89
- // The output file is HUGE and uses classes still
90
88
const output = `${ PREFIX } ${ JSON . stringify ( String ( code ) ) } ${ POSTFIX } ` ;
91
89
await fs_writeFile ( es2017toEs5OutputOptions . file , output , 'utf-8' ) ;
92
90
}
You can’t perform that action at this time.
0 commit comments