Skip to content

Commit 152e544

Browse files
Tree-shake ES5
1 parent f1ddd70 commit 152e544

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/firestore/rollup.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2018 Google Inc.
3+
* Copyright 2018 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -105,6 +105,11 @@ const es5BuildPlugins = [
105105
transformers: appendPrivatePrefixTransformers,
106106
cacheRoot: `./.cache/es5.mangled/`
107107
}),
108+
{
109+
transform(code, id) {
110+
return code.replace(/\/\*\* @class \*\//g, "\/*@__PURE__*\/");
111+
}
112+
},
108113
json(),
109114
terser(manglePrivatePropertiesOptions)
110115
];
@@ -152,7 +157,7 @@ const browserBuilds = [
152157
format: 'es',
153158
sourcemap: true
154159
},
155-
plugins: es5BuildPlugins,
160+
plugins: es2017BuildPlugins,
156161
external: resolveBrowserExterns
157162
},
158163
// ES2017 ESM build (memory-only)

0 commit comments

Comments
 (0)