diff --git a/lib/core-common/src/utils/has-dotenv.ts b/lib/core-common/src/utils/has-dotenv.ts index 34715b91daa6..41e209e14a88 100644 --- a/lib/core-common/src/utils/has-dotenv.ts +++ b/lib/core-common/src/utils/has-dotenv.ts @@ -1,11 +1,10 @@ import fs from 'fs'; import path from 'path'; -// https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34 -const DOTENV_FILE = path.join('.', '.env'); - /** * Is there a .env file in the current directory? + * * This is the default behavior of `dotenv-webpack-plugin` + * https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34 */ -export const hasDotenv = () => fs.existsSync(DOTENV_FILE); +export const hasDotenv = () => fs.existsSync(path.join('.', '.env'));