Skip to content

Commit

Permalink
Replace each process.env with import.env.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoichiro committed May 30, 2024
1 parent 53f1f40 commit 15cd9a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/services/provider/Firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ import * as crypto from 'crypto';
import { IBootloaderType } from '../firmware/Types';

const config = {
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGE_SENDER_ID,
appId: process.env.REACT_APP_FIREBASE_APP_ID,
measurementId: process.env.REACT_APP_FIREBASE_MEASUREMENT_ID,
apiKey: import.meta.env.REACT_APP_FIREBASE_API_KEY,
authDomain: import.meta.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
projectId: import.meta.env.REACT_APP_FIREBASE_PROJECT_ID,
storageBucket: import.meta.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
messagingSenderId: import.meta.env.REACT_APP_FIREBASE_MESSAGE_SENDER_ID,
appId: import.meta.env.REACT_APP_FIREBASE_APP_ID,
measurementId: import.meta.env.REACT_APP_FIREBASE_MEASUREMENT_ID,
};

const FUNCTIONS_REGION = 'asia-northeast1';
Expand Down
2 changes: 1 addition & 1 deletion src/store/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ let firebaseProvider;
try {
firebaseProvider = new FirebaseProvider();
} catch (cause) {
if (process.env.NODE_ENV === 'production') {
if (import.meta.env.NODE_ENV === 'production') {
throw cause;
} else {
console.warn(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/GoogleAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let analytics: firebase.analytics.Analytics | null;
try {
analytics = firebase.analytics();
} catch (cause) {
if (process.env.NODE_ENV === 'production') {
if (import.meta.env.NODE_ENV === 'production') {
throw cause;
} else {
analytics = null;
Expand Down

0 comments on commit 15cd9a0

Please sign in to comment.