chore: Remove env variables in webpack bundle (#1353)

* chore: Remove env variables in webpack bundle

* remove unused globals

* refactor: consolidate window.env calls to single file

* fix: Slack client side integration auth

* fix: developers url
This commit is contained in:
Tom Moor
2020-07-18 11:02:40 -07:00
committed by GitHub
parent 24448c7504
commit 67981a351e
32 changed files with 186 additions and 206 deletions

View File

@@ -1,7 +1,6 @@
/* eslint-disable */
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
@@ -21,9 +20,6 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
productionWebpackConfig.plugins = [
...productionWebpackConfig.plugins,
new ManifestPlugin(),
new HtmlWebpackPlugin({
template: 'server/static/index.html',
}),
new UglifyJsPlugin({
sourceMap: true,
uglifyOptions: {
@@ -32,13 +28,7 @@ productionWebpackConfig.plugins = [
}
}),
new webpack.DefinePlugin({
'process.env.DEPLOYMENT': JSON.stringify(process.env.DEPLOYMENT),
'process.env.URL': JSON.stringify(process.env.URL),
'process.env.TEAM_LOGO': JSON.stringify(process.env.TEAM_LOGO),
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.GOOGLE_ANALYTICS_ID': JSON.stringify(process.env.GOOGLE_ANALYTICS_ID),
'process.env.SUBDOMAINS_ENABLED': JSON.stringify(process.env.SUBDOMAINS_ENABLED === 'true'),
'process.env.WEBSOCKETS_ENABLED': JSON.stringify(process.env.WEBSOCKETS_ENABLED === 'true'),
}),
];