Skip to content

Commit 4c82460

Browse files
authored
Merge de5f274 into 2e7586d
2 parents 2e7586d + de5f274 commit 4c82460

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.changeset/selfish-tools-obey.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"firebase": patch
3+
---
4+
5+
Fix compatability layer errors that were being thrown in Safari

packages/firebase/compat/rollup.config.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ import compatPkg from './package.json';
2929
import appPkg from './app/package.json';
3030

3131
const external = Object.keys(pkg.dependencies || {});
32+
const uglifyOptions = {
33+
mangle: true,
34+
webkit: true // Necessary to avoid https://bugs.webkit.org/show_bug.cgi?id=223533
35+
};
3236

3337
/**
3438
* Global UMD Build
@@ -123,7 +127,7 @@ const appBuilds = [
123127
format: 'umd',
124128
name: GLOBAL_NAME
125129
},
126-
plugins: [...plugins, typescriptPluginCDN, uglify()]
130+
plugins: [...plugins, typescriptPluginCDN, uglify(uglifyOptions)]
127131
}
128132
];
129133

@@ -163,7 +167,7 @@ const componentBuilds = compatPkg.components
163167
{
164168
input: `${__dirname}/${component}/index.ts`,
165169
output: createUmdOutputConfig(`firebase-${component}-compat.js`),
166-
plugins: [...plugins, typescriptPluginCDN, uglify()],
170+
plugins: [...plugins, typescriptPluginCDN, uglify(uglifyOptions)],
167171
external: ['@firebase/app-compat', '@firebase/app']
168172
}
169173
];
@@ -197,7 +201,7 @@ const completeBuilds = [
197201
sourcemap: true,
198202
name: GLOBAL_NAME
199203
},
200-
plugins: [...plugins, typescriptPluginCDN, uglify()]
204+
plugins: [...plugins, typescriptPluginCDN, uglify(uglifyOptions)]
201205
},
202206
/**
203207
* App Node.js Builds
@@ -244,7 +248,7 @@ const completeBuilds = [
244248
typescriptPluginCDN,
245249
json(),
246250
commonjs(),
247-
uglify()
251+
uglify(uglifyOptions)
248252
]
249253
},
250254
/**

0 commit comments

Comments
 (0)