Data variables in process.env instead of process

This commit is contained in:
muzam1l
2022-07-05 16:58:07 +05:30
parent f0e730bb9b
commit 3e9e26a46a

View File

@@ -30,7 +30,7 @@ const generateHtmlTemplate = (code: string, data?: Record<string, any>) => {
const process = { env: { NODE_ENV: "production" } } as any;
if (data) {
Object.keys(data).forEach(key => {
process[key] = data[key];
process.env[key] = data[key];
});
}
processString = JSON.stringify(process);