不同分支写不同的env即可

module.exports = {
    apps: [
        {
            script: 'dist/main.js',
            watch: false,
            instances: 1,
            autorestart: true,
            max_memory_restart: '3G',
						# 这里
            env: { NODE_ENV: 'preproduction' },
        },
    ],
};