Skip to content

Commit

Permalink
Merge pull request #9 from edx/aed/prod-env
Browse files Browse the repository at this point in the history
fix(packaging): Add default environment key/value pairs to prod webpack config
  • Loading branch information
schenedx authored Nov 14, 2018
2 parents 231685e + 85fa6bc commit 85cf3e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config/webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const Merge = require('webpack-merge');
const commonConfig = require('./webpack.common.config.js');
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -91,5 +92,20 @@ module.exports = Merge.smart(commonConfig, {
inject: true, // Appends script tags linking to the webpack bundles at the end of the body
template: path.resolve(__dirname, '../public/index.html'),
}),
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
BASE_URL: null,
LMS_BASE_URL: null,
LOGIN_URL: null,
LOGOUT_URL: null,
REFRESH_ACCESS_TOKEN_ENDPOINT: null,
DATA_API_BASE_URL: null,
SEGMENT_KEY: null,
FEATURE_FLAGS: {},
ACCESS_TOKEN_COOKIE_NAME: null,
CSRF_COOKIE_NAME: 'csrftoken',
NEW_RELIC_APP_ID: null,
NEW_RELIC_LICENSE_KEY: null,
}),
],
});

0 comments on commit 85cf3e3

Please sign in to comment.