Compare commits

..

2 Commits

Author SHA1 Message Date
Simon Chen
85cf3e35e4 Merge pull request #9 from edx/aed/prod-env
fix(packaging): Add default environment key/value pairs to prod webpack config
2018-11-14 10:35:40 -05:00
Alex Dusenbery
85fa6bca72 fix(packaging): Add default environment key/value pairs to prod webpack config. 2018-11-14 10:23:38 -05:00

View File

@@ -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');
@@ -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,
}),
],
});