Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Fix errors that fail to load environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
GwonHeeJun committed Jan 10, 2021
1 parent fda457f commit 2655ca6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 13 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
const withImages = require('next-images')
module.exports = withImages()
const withImages = require('next-images');
module.exports = withImages({
env: {
FIREBASE_API_KEY: process.env.FIREBASE_API_KEY,
FIREBASE_AUTH_DOMAIN: process.env.FIREBASE_AUTH_DOMAIN,
FIREBASE_DATABASE_URL: process.env.FIREBASE_DATABASE_URL,
FIREBASE_PROJECT_ID: process.env.FIREBASE_PROJECT_ID,
FIREBASE_STORAGE_BUKET: process.env.FIREBASE_STORAGE_BUKET,
FIREBASE_MESSAGING_SENDER_ID: process.env.FIREBASE_MESSAGING_SENDER_ID,
FIREBASE_APP_ID: process.env.FIREBASE_APP_ID,
FIREBASE_MEASUREMENT_ID: process.env.FIREBASE_MEASUREMENT_ID
},
});
3 changes: 2 additions & 1 deletion utils/firebase.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import firebase from 'firebase/app';
import 'firebase/analytics';


const config = {
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
databaseURL: process.env.FIREBASE_DATABASE_URL,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBuket: process.env.FIREBASE_STORAGE_BUKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
apId: process.env.FIREBASE_APP_ID,
appId: process.env.FIREBASE_APP_ID,
measurementId: process.env.FIREBASE_MEASUREMENT_ID,
};

Expand Down

0 comments on commit 2655ca6

Please sign in to comment.