Is it possible to use process.env with

Is it possible to use process.env with "nodejs_compat_populate_process.env" with vitest and ‘Cloudflare/vitest-pool-workers? I'm not getting anything populated. wrangler dev works fine with process.env.


import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config';

export default defineWorkersConfig({
    test: {
        poolOptions: {
            workers: {
                experimental_remoteBindings: true,
                wrangler: { configPath: './wrangler.jsonc' },
                miniflare: {
                    compatibilityDate: '2025-05-23',
                    compatibilityFlags: ['nodejs_compat', 'nodejs_compat_populate_process_env'],
                },
            },
        },
    },
});
Was this page helpful?