Skip to content

Feature Request: Need Support for local env file (.env.*.local) #19

@nguyenlenghia

Description

@nguyenlenghia

thanks for the great plugin!

Vite.js supports environment override files such as .env.development.local, which allow developers to define machine-specific or sensitive local variables without affecting team-wide config. Currently, it seems that the plugin does not load or recognize this file type.

It would be very helpful if the plugin could support .env.development.local (and similar *.local env files) to stay consistent with Vite’s environment variable loading behavior.

const envModeLocalPath = Path.resolve(vite_config.root, vite_config.envDir, `.env.${vite_config.mode}.local`);
if (fs.existsSync(envModeLocalPath )) {
  envObj = { ...envObj, ...dotenv.parse(fs.readFileSync(envModeLocalPath )) };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions