File tree 2 files changed +28
-6
lines changed
2 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ Vue.use(Vuex);
6
6
7
7
// firebase config.
8
8
firebase . initializeApp ( {
9
- apiKey : process . env . API_KEY ,
10
- authDomain : process . env . AUTH_DOMAIN ,
11
- databaseURL : process . env . DB_URL ,
12
- projectId : process . env . PROJECT_ID ,
13
- storageBucket : process . env . STORAGE_BUCKET ,
14
- messagingSenderId : process . env . MESSAGING_SENDER_ID ,
9
+ apiKey : API_KEY ,
10
+ authDomain : AUTH_DOMAIN ,
11
+ databaseURL : DB_URL ,
12
+ projectId : PROJECT_ID ,
13
+ storageBucket : STORAGE_BUCKET ,
14
+ messagingSenderId : MESSAGING_SENDER_ID ,
15
15
} ) ;
16
16
17
17
const DATABASE = 'todo-list' ;
Original file line number Diff line number Diff line change
1
+ // vue.config.js
2
+ module . exports = {
3
+ chainWebpack : config => {
4
+ config
5
+ . plugin ( 'define' )
6
+ . tap ( options => {
7
+ const newOptions = options ;
8
+ let existingDefs = newOptions . pop ( ) ;
9
+ existingDefs = Object . assign ( existingDefs , {
10
+ API_KEY : JSON . stringify ( process . env . API_KEY ) ,
11
+ AUTH_DOMAIN : JSON . stringify ( process . env . AUTH_DOMAIN ) ,
12
+ DB_URL : JSON . stringify ( process . env . DB_URL ) ,
13
+ PROJECT_ID : JSON . stringify ( process . env . PROJECT_ID ) ,
14
+ STORAGE_BUCKET : JSON . stringify ( process . env . STORAGE_BUCKET ) ,
15
+ MESSAGING_SENDER_ID : JSON . stringify ( process . env . MESSAGING_SENDER_ID ) ,
16
+ } ) ;
17
+ newOptions . push ( existingDefs ) ;
18
+
19
+ return newOptions ;
20
+ } )
21
+ } ,
22
+ } ;
You can’t perform that action at this time.
0 commit comments