Skip to content

Commit 736e3f0

Browse files
committed
Only use dotenv-safe in development
1 parent 55d02b3 commit 736e3f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

webpack/base.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
require('dotenv-safe').load();
2-
31
import path from 'path';
42
import webpack from 'webpack';
53
import mapValues from 'lodash/mapValues';
64
import isomorphicConfig from './isomorphic';
75
import IsomorphicPlugin from 'webpack-isomorphic-tools/plugin';
86
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
9-
import Dotenv from 'dotenv-webpack';
107
import {
118
ANALYZE, NODE_ENV, WEBPACK_OUTPUT_PATH, ASSET_URL, RESOLVE_PATHS
129
} from './constants';
@@ -17,7 +14,6 @@ const isomorphicPlugin = new IsomorphicPlugin(isomorphicConfig).development(isDe
1714
const plugins = [
1815
isomorphicPlugin,
1916
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en|es/),
20-
new Dotenv({ safe: true }),
2117
new webpack.DefinePlugin({
2218
'process.env': {
2319
'NODE_ENV': JSON.stringify(NODE_ENV)

webpack/development.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
require('dotenv-safe').load();
2+
13
import baseConfig from './base';
24
import webpack from 'webpack';
35
import ExtractTextPlugin from 'extract-text-webpack-plugin';
6+
import Dotenv from 'dotenv-webpack';
47
import { SCSS_LOADERS } from './constants';
58

69
const plugins = [
10+
new Dotenv({ safe: true }),
711
new ExtractTextPlugin('[name].css'),
812
new webpack.optimize.CommonsChunkPlugin({
913
name: 'vendor',

0 commit comments

Comments
 (0)