2022-03-28 15:56:43 +00:00
|
|
|
const fs = require("fs");
|
|
|
|
const path = require("path");
|
|
|
|
const browserslist = require("browserslist-useragent-regexp");
|
|
|
|
|
|
|
|
const userAgentRegExp = browserslist.getUserAgentRegExp({ allowHigherVersions: true });
|
|
|
|
const checkFunction = `export const supportedBrowsers = ${userAgentRegExp};`;
|
2023-02-18 19:51:23 +00:00
|
|
|
fs.writeFileSync(path.resolve(__dirname, "../src/supported-browsers.js"), checkFunction);
|
2023-04-20 21:01:58 +00:00
|
|
|
|
|
|
|
const firebaseConfig = process.env.FIREBASE_CONFIG;
|
|
|
|
if (firebaseConfig) {
|
|
|
|
fs.writeFileSync(
|
|
|
|
path.resolve(__dirname, "../src/core/storage/firebase-config.js"),
|
|
|
|
`export const firebaseConfig = ${firebaseConfig};`
|
|
|
|
);
|
|
|
|
}
|