-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
46 lines (44 loc) · 1.58 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
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: 'server.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.REDIS_DEV_HOST': JSON.stringify(process.env.REDIS_DEV_HOST),
'process.env.REDIS_PORT': JSON.stringify(process.env.REDIS_PORT),
'process.env.REDIS_DEV_PASSWORD': JSON.stringify(
process.env.REDIS_DEV_PASSWORD,
),
'process.env.JWT_SECRET_KEY': JSON.stringify(process.env.JWT_SECRET_KEY),
'process.env.WISHBOARD_GMAIL_ID': JSON.stringify(
process.env.WISHBOARD_GMAIL_ID,
),
'process.env.WISHBOARD_GMAIL_PW': JSON.stringify(
process.env.WISHBOARD_GMAIL_PW,
),
'process.env.AWS_ACCESS_KEY': JSON.stringify(process.env.AWS_ACCESS_KEY),
'process.env.AWS_SECRET_KEY': JSON.stringify(process.env.AWS_SECRET_KEY),
'process.env.BUCKET_NAME': JSON.stringify(process.env.BUCKET_NAME_DEV),
}),
],
stats: {
errorDetails: true,
},
};