mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-08-16 23:10:38 +03:00
Avoid overwriting native process env
This commit is contained in:
parent
b066cf43c0
commit
4be1f2876c
@ -339,7 +339,8 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'process.localEnv': {
|
||||
'NODE_ENV': JSON.stringify('local'),
|
||||
'GIT_HASH': JSON.stringify(gitHash),
|
||||
'OAUTH_TOKEN': JSON.stringify(localEnv.OAUTH_TOKEN)
|
||||
}
|
||||
|
@ -424,7 +424,8 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'process.localEnv': {
|
||||
'NODE_ENV': JSON.stringify('production'),
|
||||
'GIT_HASH': JSON.stringify(gitHash)
|
||||
}
|
||||
}),
|
||||
|
@ -28,7 +28,7 @@ import FacebookLogo from '../../images/logos/facebook-logo.png';
|
||||
import '../../styles/gradient.css';
|
||||
import '../../styles/font.css';
|
||||
|
||||
const hash = process.env.GIT_HASH ? `#${process.env.GIT_HASH}` : '';
|
||||
const hash = process.localEnv.GIT_HASH ? `#${process.localEnv.GIT_HASH}` : '';
|
||||
const version = require('../../../package.json').version + hash;
|
||||
|
||||
const themeColor = '#457cff';
|
||||
|
@ -193,7 +193,7 @@ class NotificationsPage extends React.Component {
|
||||
amplitude.getInstance().setUserProperties({
|
||||
username: user.login,
|
||||
full_name: user.name,
|
||||
version: process.env.GIT_HASH ? process.env.GIT_HASH : 'unknown'
|
||||
version: process.localEnv.GIT_HASH ? process.localEnv.GIT_HASH : 'unknown'
|
||||
});
|
||||
this.setState({user});
|
||||
});
|
||||
|
@ -78,7 +78,7 @@ import {
|
||||
} from './ui';
|
||||
export const AnimatedNotificationRow = animated(NotificationRow);
|
||||
|
||||
const hash = process.env.GIT_HASH ? `#${process.env.GIT_HASH}` : '';
|
||||
const hash = process.localEnv.GIT_HASH ? `#${process.localEnv.GIT_HASH}` : '';
|
||||
const version = require('../../../../package.json').version + hash;
|
||||
|
||||
function PageItem ({children, onChange, ...props}) {
|
||||
|
@ -12,7 +12,7 @@ import '../../styles/font.css';
|
||||
|
||||
const themeColor = '#27B768';
|
||||
|
||||
const hash = process.env.GIT_HASH ? `#${process.env.GIT_HASH}` : '';
|
||||
const hash = process.localEnv.GIT_HASH ? `#${process.localEnv.GIT_HASH}` : '';
|
||||
const version = require('../../../package.json').version + hash;
|
||||
|
||||
export const forSmallScreens = rules => `
|
||||
|
@ -6,7 +6,12 @@ const {Provider, Consumer} = React.createContext();
|
||||
|
||||
class AuthProvider extends React.Component {
|
||||
state = {
|
||||
token: this.props.cookiesApi.getCookie(OAUTH_TOKEN_COOKIE) || process.env.OAUTH_TOKEN
|
||||
token: (
|
||||
this.props.cookiesApi.getCookie(OAUTH_TOKEN_COOKIE) ||
|
||||
(process.localEnv.NODE_ENV === 'local'
|
||||
? process.localEnv.OAUTH_TOKEN
|
||||
: undefined)
|
||||
)
|
||||
}
|
||||
|
||||
setToken = token => {
|
||||
|
Loading…
Reference in New Issue
Block a user