I am having error when adding this code in my webpack.config.js Uncaught SyntaxError: Unexpected token ‘:’
const webpack = require('webpack');
const dotenv = require('dotenv');
dotenv.config();
module.exports = {
//...
plugins: [
// ...
new webpack.DefinePlugin({
'process.env': JSON.stringify(process.env)
})
// ...
]
//...
}
app.js
'use strict';
const dotenv = require('dotenv');
const config = dotenv.config();
const {API_KEYS} =config.parsed;
....
console.log("keys ",API_KEYS)
....