This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const dotenv = require('dotenv'); | |
const fs = require('fs'); // to check if the file exists | |
const path = require('path'); // to get the current path | |
module.exports = (env) => { | |
// Get the root path (assuming your webpack config is in the root of your project!) | |
const currentPath = path.join(__dirname); | |
// Create the fallback path (the production .env) |