Skip to content

Commit ef5710f

Browse files
WIP
1 parent 660c4d9 commit ef5710f

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

packages/firebase/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2018 Google LLC
3+
* Copyright 2018 Google Inc.
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.
@@ -168,7 +168,7 @@ const firestoreMemoryBuilds = [
168168
{
169169
input: `firestore/memory/index.ts`,
170170
output: createUmdOutputConfig(`firebase-firestore.memory.js`),
171-
plugins: [...plugins, terser()],
171+
plugins: [...plugins, uglify()],
172172
external: ['@firebase/app']
173173
}
174174
];

packages/firestore/rollup.config.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ export function resolveMemoryExterns(deps, externsId, referencedBy) {
9999
return deps.some(dep => externsId === dep || externsId.startsWith(`${dep}/`));
100100
}
101101

102+
const es5BuildPlugins = [
103+
typescriptPlugin({
104+
typescript,
105+
tsconfigOverride: {
106+
compilerOptions: {
107+
allowJs: true
108+
}
109+
},
110+
include: ["*.js", "**/*.js"],
111+
}),
112+
sourcemaps()
113+
];
114+
102115
const es2017BuildPlugins = [
103116
typescriptPlugin({
104117
typescript,
@@ -146,7 +159,7 @@ const browserBuilds = [
146159
{
147160
input: pkg.esm2017,
148161
output: { file: pkg.module, format: 'es', sourcemap: true },
149-
plugins: [sourcemaps()]
162+
plugins: es5BuildPlugins
150163
},
151164
// ES5 ESM Build (memory-only)
152165
{
@@ -156,13 +169,13 @@ const browserBuilds = [
156169
format: 'es',
157170
sourcemap: true
158171
},
159-
plugins: [sourcemaps()]
172+
plugins: es5BuildPlugins
160173
},
161174
// ES5 CJS Build (with persistence)
162175
{
163176
input: pkg.esm2017,
164177
output: { file: pkg.browser, format: 'cjs', sourcemap: true },
165-
plugins: [sourcemaps()]
178+
plugins: es5BuildPlugins
166179
},
167180
// ES5 CJS Build (memory-only)
168181
{
@@ -172,7 +185,7 @@ const browserBuilds = [
172185
format: 'cjs',
173186
sourcemap: true
174187
},
175-
plugins: [sourcemaps()]
188+
plugins: es5BuildPlugins
176189
}
177190
];
178191

0 commit comments

Comments
 (0)