File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ console.log('Building dist for node (cjs)...');
77
88// Generate entry-points for cjs compatibility
99const localeDir = 'locale' ;
10+ const target = [ 'ES2019' , 'node14.6' ] ;
11+
1012if ( existsSync ( localeDir ) ) {
1113 rmSync ( localeDir , { recursive : true , force : true } ) ;
1214}
@@ -33,7 +35,7 @@ buildSync({
3335 // splitting: true, // Doesn't work with cjs
3436 format : 'cjs' ,
3537 platform : 'node' ,
36- target : 'node14' ,
38+ target,
3739} ) ;
3840
3941console . log ( 'Building dist for node type=module (esm)...' ) ;
@@ -48,6 +50,6 @@ buildSync({
4850 minify : true ,
4951 splitting : true ,
5052 format : 'esm' ,
51- target : 'node14' ,
53+ target,
5254 outExtension : { '.js' : '.mjs' } ,
5355} ) ;
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "target" : " ES2020 " ,
3+ "target" : " ES2019 " ,
44 "moduleResolution" : " Node" ,
55 "rootDir" : " src" ,
66 "outDir" : " dist" ,
You can’t perform that action at this time.
0 commit comments