Skip to content

Commit 6c8eabf

Browse files
authored
Update console.build.js to set a value on window (#5979)
1 parent f5ac47f commit 6c8eabf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/firestore-compat/tools/console.build.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,15 @@ const es5OutputOptions = {
5757
format: 'iife'
5858
};
5959

60-
const PREFIX = `
61-
goog.module('firestore');
62-
exports = eval(`;
63-
64-
const POSTFIX = ` + '${EXPORTNAME};');`;
60+
const POSTFIX = `window['${EXPORTNAME}']=${EXPORTNAME};`;
6561

6662
async function build() {
6763
const es5Bundle = await rollup.rollup(es5InputOptions);
6864
const {
6965
output: [{ code }]
7066
} = await es5Bundle.generate(es5OutputOptions);
7167

72-
const output = `${PREFIX}${JSON.stringify(String(code))}${POSTFIX}`;
68+
const output = `${String(code)}${POSTFIX}`;
7369

7470
if (!fs.existsSync(OUTPUT_FOLDER)) {
7571
fs.mkdirSync(OUTPUT_FOLDER);

0 commit comments

Comments
 (0)