-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
62 lines (60 loc) · 2.11 KB
/
webpack.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
58
59
60
61
62
const path = require('path');
const webpack = require('webpack');
const dotenv = require('dotenv');
dotenv.config({
path: './.env',
});
module.exports = {
target: 'node',
entry: './src/app.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'pushScheduler.js',
},
plugins: [
new webpack.DefinePlugin({
'process.env.PORT': JSON.stringify(process.env.PORT),
'process.env.DB_DEV_HOST': JSON.stringify(process.env.DB_DEV_HOST),
'process.env.DB_DEV_USER': JSON.stringify(process.env.DB_DEV_USER),
'process.env.DB_DEV_PASSWORD': JSON.stringify(
process.env.DB_DEV_PASSWORD,
),
'process.env.DB_PORT': JSON.stringify(process.env.DB_PORT),
'process.env.DB_DEV_NAME': JSON.stringify(process.env.DB_DEV_NAME),
'process.env.JWT_SECRET_KEY': JSON.stringify(process.env.JWT_SECRET_KEY),
'process.env.DB_PORT': JSON.stringify(process.env.DB_PORT),
'process.env.DB_NAME': JSON.stringify(process.env.DB_NAME),
'process.env.FIREBASE_TYPE': JSON.stringify(process.env.FIREBASE_TYPE),
'process.env.FIREBASE_PROJECT_ID': JSON.stringify(
process.env.FIREBASE_PROJECT_ID,
),
'process.env.FIREBASE_PRIVATE_KEY': JSON.stringify(
process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n'),
),
'process.env.FIREBASE_CLIENT_EMAIL': JSON.stringify(
process.env.FIREBASE_CLIENT_EMAIL,
),
'process.env.FIREBASE_CLIENT_ID': JSON.stringify(
process.env.FIREBASE_CLIENT_ID,
),
'process.env.FIREBASE_AUTH_URI': JSON.stringify(
process.env.FIREBASE_AUTH_URI,
),
'process.env.FIREBASE_TOKEN_URI': JSON.stringify(
process.env.FIREBASE_TOKEN_URI,
),
'process.env.FIREBASE_AUTH_PROVIDER_X509_CERT_URI': JSON.stringify(
process.env.FIREBASE_AUTH_PROVIDER_X509_CERT_URI,
),
'process.env.FIREBASE_CLIENT_X509_CERT_URI': JSON.stringify(
process.env.FIREBASE_CLIENT_X509_CERT_URI,
),
'process.env.SLACK_API_TOKEN': JSON.stringify(
process.env.SLACK_API_TOKEN,
),
}),
],
stats: {
errorDetails: true,
},
};