@@ -34,17 +34,17 @@ const pkg = require('./package.json');
34
34
// This file contains shared utilities for Firestore's rollup builds.
35
35
36
36
// Firestore is released in a number of different build configurations:
37
- // - Browser builds that support persistence in ES5 CJS and ES5 ESM formats and
38
- // ES2017 in ESM format.
39
- // - In-memory Browser builds that support persistence in ES5 CJS and ES5 ESM
40
- // formats and ES2017 in ESM format.
37
+ // - Browser builds that support persistence in ES2017 CJS and ESM formats.
38
+ // - In-memory Browser builds that support persistence in ES2017 CJS and ESM
39
+ // formats.
41
40
// - A NodeJS build that supports persistence (to be used with an IndexedDb
42
41
// shim)
43
42
// - A in-memory only NodeJS build
44
43
//
45
44
// The in-memory builds are roughly 130 KB smaller, but throw an exception
46
45
// for calls to `enablePersistence()` or `clearPersistence()`.
47
46
//
47
+ // TODO(dlarocque): Update this pipeline, since we no longer need to target ES5.
48
48
// We use two different rollup pipelines to take advantage of tree shaking,
49
49
// as Rollup does not support tree shaking for TypeScript classes transpiled
50
50
// down to ES5 (see https://bit.ly/340P23U). The build pipeline in this file
@@ -248,11 +248,6 @@ exports.es2017Plugins = function (platform, mangled = false) {
248
248
alias ( generateAliasConfig ( platform ) ) ,
249
249
typescriptPlugin ( {
250
250
typescript,
251
- tsconfigOverride : {
252
- compilerOptions : {
253
- target : 'es2017'
254
- }
255
- } ,
256
251
cacheDir : tmp . dirSync ( ) ,
257
252
transformers : [ removeAssertAndPrefixInternalTransformer ]
258
253
} ) ,
@@ -264,11 +259,6 @@ exports.es2017Plugins = function (platform, mangled = false) {
264
259
alias ( generateAliasConfig ( platform ) ) ,
265
260
typescriptPlugin ( {
266
261
typescript,
267
- tsconfigOverride : {
268
- compilerOptions : {
269
- target : 'es2017'
270
- }
271
- } ,
272
262
cacheDir : tmp . dirSync ( ) ,
273
263
transformers : [ removeAssertTransformer ]
274
264
} ) ,
@@ -277,50 +267,6 @@ exports.es2017Plugins = function (platform, mangled = false) {
277
267
}
278
268
} ;
279
269
280
- exports . es2017ToEs5Plugins = function ( mangled = false ) {
281
- if ( mangled ) {
282
- return [
283
- typescriptPlugin ( {
284
- typescript,
285
- tsconfigOverride : {
286
- compilerOptions : {
287
- allowJs : true
288
- }
289
- } ,
290
- include : [ 'dist/**/*.js' ] ,
291
- cacheDir : tmp . dirSync ( )
292
- } ) ,
293
- terser ( {
294
- output : {
295
- comments : 'all' ,
296
- beautify : true
297
- } ,
298
- // See comment above `manglePrivatePropertiesOptions`. This build did
299
- // not have the identical variable name issue but we should be
300
- // consistent.
301
- mangle : {
302
- reserved : [ '_getProvider' ]
303
- }
304
- } ) ,
305
- sourcemaps ( )
306
- ] ;
307
- } else {
308
- return [
309
- typescriptPlugin ( {
310
- typescript,
311
- tsconfigOverride : {
312
- compilerOptions : {
313
- allowJs : true
314
- }
315
- } ,
316
- include : [ 'dist/**/*.js' ] ,
317
- cacheDir : tmp . dirSync ( )
318
- } ) ,
319
- sourcemaps ( )
320
- ] ;
321
- }
322
- } ;
323
-
324
270
exports . es2017PluginsCompat = function (
325
271
platform ,
326
272
pathTransformer ,
@@ -331,11 +277,6 @@ exports.es2017PluginsCompat = function (
331
277
alias ( generateAliasConfig ( platform ) ) ,
332
278
typescriptPlugin ( {
333
279
typescript,
334
- tsconfigOverride : {
335
- compilerOptions : {
336
- target : 'es2017'
337
- }
338
- } ,
339
280
cacheDir : tmp . dirSync ( ) ,
340
281
abortOnError : true ,
341
282
transformers : [
@@ -351,11 +292,6 @@ exports.es2017PluginsCompat = function (
351
292
alias ( generateAliasConfig ( platform ) ) ,
352
293
typescriptPlugin ( {
353
294
typescript,
354
- tsconfigOverride : {
355
- compilerOptions : {
356
- target : 'es2017'
357
- }
358
- } ,
359
295
cacheDir : tmp . dirSync ( ) ,
360
296
abortOnError : true ,
361
297
transformers : [ removeAssertTransformer , pathTransformer ]
0 commit comments