Skip to content

Instantly share code, notes, and snippets.

@hsubox76
hsubox76 / packages.js
Last active August 28, 2024 18:52
packages to add node engines line
const packagesToAddEngines = [
"packages/app-check-compat",
"packages/app-check",
"packages/app-compat",
"packages/app",
"packages/auth-compat",
"packages/auth/internal",
"packages/auth",
"packages/component",
"packages/database-compat",

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %} {% extends "_internal/templates/reference.html" %} {% block title %}Analytics interface{% endblock title %} {% block body %} An instance of Firebase Analytics.

@hsubox76
hsubox76 / gist:40ee8fecddd238f9ab2775a974db1593
Created March 13, 2020 19:17
Webpack config to prefer main (usually Node)
module.exports = {
//...
resolve: {
mainFields: ['main', 'module']
}
};
@hsubox76
hsubox76 / gist:bc27be0c0150aaff0157060e026f47bc
Last active March 13, 2020 19:13
Webpack default config
module.exports = {
//...
resolve: {
mainFields: ['browser', 'module', 'main']
}
};
@hsubox76
hsubox76 / gist:b17fd4865378fed127b478a8fe63c8fd
Created November 14, 2019 18:38
Firebase script tag import
<!-- Firebase bundles -->
<script src="../node_modules/firebase/firebase-app.js"></script>
<script src="../node_modules/firebase/firebase-auth.js"></script>
<script src="../node_modules/firebase/firebase-storage.js"></script>
<script src="../node_modules/firebase/firebase-firestore.js"></script>
<!-- Your code -->
<script type="text/javascript" src="../index.js"></script>
@hsubox76
hsubox76 / package.json
Created November 14, 2019 18:31
@firebase.app package.json
{
"name": "@firebase/app",
"version": "0.4.8",
...
"main": "dist/index.node.cjs.js",
"browser": "dist/index.cjs.js",
"module": "dist/index.esm.js",
...
}
@hsubox76
hsubox76 / gist:27244a0f49dc7c0d656d20a621b15255
Created August 30, 2017 19:42
Basic Firebase Google redirect auth boilerplate
import React, { Component } from 'react';
import './App.css';
import * as firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
class App extends Component {
constructor() {
super();
this.state = {
@hsubox76
hsubox76 / ReactAddonsDOMDependenciesUMDShim.js
Created November 23, 2016 23:27
fix react addons UMD missing ReactDOM dependency
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactAddonsDOMDependenciesUMDShim
*/