const Dotenv = require('dotenv-webpack');
const path = require('path');

module.exports = {
  entry: './app/index.jsx',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'index_bundle.js',
  },

  resolve: {
    extensions: ['.js', '.jsx'],
  },

  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,
        use: 'babel-loader',
      },
      { test: /\.css$/, use: ['style-loader', 'css-loader'] },
      { test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
    ],
  },
  plugins: [
    new Dotenv({
      path: './.env',
      safe: false,
    }),
  ],
};

@@ -1,20 +1,18 @@
 const 
-Dotenv
+path
  = requi
@@ -19,23 +19,41 @@
 re('
-dotenv-webpack'
+path');%0Arequire('dotenv').config(
 );%0Ac
@@ -53,28 +53,31 @@
 ig();%0Aconst 
-path
+webpack
  = require('
@@ -76,21 +76,143 @@
 equire('
-path'
+webpack');%0A%0Aconst envsDefinePlugin = new webpack.DefinePlugin(%7B%0A  'process.env.API_KEY': JSON.stringify(process.env.API_KEY),%0A%7D
 );%0A%0Amodu
@@ -708,68 +708,24 @@
     
-new Dotenv(%7B%0A      path: './.env',%0A      safe: false,%0A    %7D)
+envsDefinePlugin
 ,%0A  

edit webpack config