Set ENV in webpack and always log in development
This commit is contained in:
parent
53efd55890
commit
e55ba15613
4 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import store from 'store.js';
|
||||
|
||||
const env = process.env.NODE_ENV || 'production';
|
||||
const env = ENV;
|
||||
const config = require(`./config/${env}`);
|
||||
const logs = [];
|
||||
const app = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const redux = require('redux');
|
||||
const thunk = require("redux-thunk").default;
|
||||
const env = process.env.NODE_ENV || 'production';
|
||||
const env = ENV;
|
||||
|
||||
import {
|
||||
createLogger
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack')
|
||||
const appPath = path.resolve(__dirname, 'js');
|
||||
|
||||
const PATHS = {
|
||||
|
@ -18,6 +19,11 @@ module.exports = {
|
|||
root: appPath,
|
||||
extensions: ['', '.js', '.jsx', '.css'],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
ENV: JSON.stringify("development"),
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
preLoaders: [
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack')
|
||||
const WebpackNotifierPlugin = require('webpack-notifier')
|
||||
|
||||
const appPath = path.resolve(__dirname, 'js');
|
||||
|
@ -25,6 +26,9 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
new WebpackNotifierPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
ENV: JSON.stringify("development"),
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
preLoaders: [
|
||||
|
|
Loading…
Reference in a new issue