diff --git a/package.json b/package.json index e8db1fa..54543f2 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "webpack-basics", + "name": "netflix-clone", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/webpack.config.js b/webpack.config.js index 75e9046..f6a0e9b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,20 +1,21 @@ -const HtmlWebPackPlugin = require('html-webpack-plugin'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const { CleanWebpackPlugin } = require('clean-webpack-plugin'); -const dotenv = require('dotenv'); -const webpack = require('webpack'); -var path = require('path'); +const HtmlWebPackPlugin = require('html-webpack-plugin') +const CopyWebpackPlugin = require('copy-webpack-plugin') +const MiniCssExtractPlugin = require('mini-css-extract-plugin') +const { CleanWebpackPlugin } = require('clean-webpack-plugin') +const dotenv = require('dotenv') +const webpack = require('webpack') +var path = require('path') module.exports = () => { // call dotenv and it will return an Object with a parsed key - const env = dotenv.config().parsed; + const env = dotenv.config().parsed + console.log('env------', env) // reduce env variables to an oject const envKeys = Object.keys(env).reduce((prev, next) => { - prev[`process.env.${next}`] = JSON.stringify(env[next]); - return prev; - }, {}); + prev[`process.env.${next}`] = JSON.stringify(env[next]) + return prev + }, {}) return { entry: './src/index.js', @@ -97,5 +98,5 @@ module.exports = () => { }), new CleanWebpackPlugin(), ], - }; -}; + } +}