-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
57 lines (56 loc) · 1.96 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const withOptimizedImages = require('next-optimized-images')
module.exports = () => {
if (process.env.DEPLOY_ENV !== 'PRODUCTION') {
return withOptimizedImages({
reactStrictMode: true,
poweredByHeader: false,
trailingSlash: true,
images: {
disableStaticImages: true,
loader: 'akamai',
path: '',
},
optipng: {
optimizationLevel: 4,
},
env: {
NEXT_PUBLIC_FIREBASE_API_KEY: process.env.NEXT_ENV_FIREBASE_API_KEY,
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN:
process.env.NEXT_ENV_FIREBASE_AUTH_DOMAIN,
NEXT_PUBLIC_FIREBASE_DATABASE_URL:
process.env.NEXT_ENV_FIREBASE_DATABASE_URL,
NEXT_PUBLIC_FIREBASE_PROJECT_ID:
process.env.NEXT_ENV_FIREBASE_PROJECT_ID,
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET:
process.env.NEXT_ENV_FIREBASE_STORAGE_BUCKET,
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID:
process.env.NEXT_ENV_FIREBASE_MEASUREMENT_ID,
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID:
process.env.NEXT_ENV_FIREBASE_MESSAGING_SENDER_ID,
NEXT_PUBLIC_FIREBASE_APP_ID: process.env.NEXT_ENV_FIREBASE_APP_ID,
},
});
}
return withOptimizedImages({
poweredByHeader: false,
trailingSlash: true,
images: {
disableStaticImages: true,
loader: 'akamai',
path: '',
},
optipng: {
optimizationLevel: 4,
},
env: {
NEXT_PUBLIC_FIREBASE_API_KEY: 'AIzaSyDGa7alU0NhfBATSQ6CalkY4Za9wWPrM7o',
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: 'nwplus-ubc.firebaseapp.com',
NEXT_PUBLIC_FIREBASE_DATABASE_URL: 'https://nwplus-ubc.firebaseio.com',
NEXT_PUBLIC_FIREBASE_PROJECT_ID: 'nwplus-ubc',
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: 'nwplus-ubc.appspot.com',
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: 'G-BT2W7DSL1G',
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: '306881258768',
NEXT_PUBLIC_FIREBASE_APP_ID: '1:306881258768:web:bc922148732abee79f7195',
},
});
}