Skip to content

Commit

Permalink
Change env stringify so it doesn't overwrite process.env (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser authored and jaredpalmer committed May 30, 2018
1 parent 18cf1ab commit 77e7796
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/razzle/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ function getClientEnvironment(target, options) {
}
);
// Stringify all values so we can feed into Webpack DefinePlugin
const stringified = {
'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]);
return env;
}, {}),
};
const stringified = Object.keys(raw).reduce((env, key) => {
env[`process.env.${key}`] = JSON.stringify(raw[key]);
return env;
}, {});

return { raw, stringified };
}
Expand Down

0 comments on commit 77e7796

Please sign in to comment.