console.log dotenv
This commit is contained in:
@@ -8,9 +8,10 @@ var path = require('path')
|
|||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
// call dotenv and it will return an Object with a parsed key
|
// call dotenv and it will return an Object with a parsed key
|
||||||
|
console.log('PROCESS', process.env.NODE_ENV)
|
||||||
const env = dotenv.config().parsed
|
const env = dotenv.config().parsed
|
||||||
console.log('process------', process.env.API_KEY)
|
// console.log('process------', process.env.API_KEY)
|
||||||
console.log('env------', dotenv.config())
|
// console.log('env------', dotenv.config())
|
||||||
|
|
||||||
// reduce env variables to an oject
|
// reduce env variables to an oject
|
||||||
const envKeys = Object.keys(env).reduce((prev, next) => {
|
const envKeys = Object.keys(env).reduce((prev, next) => {
|
||||||
@@ -18,6 +19,8 @@ module.exports = () => {
|
|||||||
return prev
|
return prev
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
|
console.log('key', envKeys)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
entry: './src/index.js',
|
entry: './src/index.js',
|
||||||
output: {
|
output: {
|
||||||
|
|||||||
Reference in New Issue
Block a user