This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The idea of this script is to directly add some packages to Firebase [Functions] projects if they were used indirectly via parent node_modules. | |
Packages outlined in the `dependencies` array below will be installed as dependencies to `thisPackage`. Current versions (if any) of them will be stored in a `backup` file. | |
In `restore` mode the `backup` file created on the main usage mode will be used to restore packages initial version or remove them at all. | |
In an ideal word, after using this script in main and `restore` modes no file changes should left. | |
Usage: | |
yarn ts-node utils/install-ext-deps.ts | |
and for `restore` mode: | |
yarn ts-node utils/install-ext-deps.ts --restore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Babel config that can be used in Expo | |
const appConfig = require('../config.js'); | |
const envConfig = appConfig.generateVariables('.env', './package.json', true); | |
module.exports = function (api) { | |
api.cache(true); | |
return { | |
presets: ['babel-preset-expo'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const jsdom = require('jsdom'); | |
/** @typedef {import("webpack/lib/Compiler.js")} WebpackCompiler */ | |
/** @typedef {import("webpack/lib/Compilation.js")} WebpackCompilation */ | |
/** @typedef {(import 'jsdom').ResourceLoaderConstructorOptions} ResourceLoaderConstructorOptions */ | |
class PrerenderHtmlPlugin { | |
constructor(options) { | |
this._options = options || { }; |