Skip to content

Perf initialize snippets #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion perf-next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
const perf = getInstance();

function intialize() {
// [START perf_initialize]
// [START perf_imports]
const { initializeApp } = require("firebase/app");
const { getPerformance } = require("firebase/performance");
// [END perf_imports]

// [START perf_initialize]
// TODO: Replace the following with your app's Firebase project configuration
// See: https://firebase.google.com/docs/web/setup#config-object
const firebaseConfig = {
Expand Down
2 changes: 2 additions & 0 deletions perf/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// [START perf_imports]
import firebase from "firebase/app";
import "firebase/performance";
// [END perf_imports]

const perf = firebase.performance();

Expand Down
10 changes: 10 additions & 0 deletions snippets/perf-next/index/perf_imports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This snippet file was generated by processing the source file:
// ./perf-next/index.js
//
// To update the snippets in this file, edit the source and then run
// 'npm run snippets'.

// [START perf_imports_modular]
import { initializeApp } from "firebase/app";
import { getPerformance } from "firebase/performance";
// [END perf_imports_modular]
3 changes: 0 additions & 3 deletions snippets/perf-next/index/perf_initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
// 'npm run snippets'.

// [START perf_initialize_modular]
import { initializeApp } from "firebase/app";
import { getPerformance } from "firebase/performance";

// TODO: Replace the following with your app's Firebase project configuration
// See: https://firebase.google.com/docs/web/setup#config-object
const firebaseConfig = {
Expand Down