1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Update local web development instructions (#1208)

* Indicate production with NODE_ENV

* Use local.json config to point to Bitwarden production APIs

* Add proxy configuration to cloud and qa environment

* Move notifications to urls

Co-authored-by: Hinton <oscar@oscarhinton.com>
This commit is contained in:
Matt Gibson
2021-10-22 07:50:08 -05:00
committed by GitHub
parent 6c581b3ebc
commit 6d4f163824
7 changed files with 38 additions and 17 deletions

View File

@@ -169,7 +169,7 @@ const plugins = [
// ref: https://webpack.js.org/configuration/dev-server/#devserver
let certSuffix = fs.existsSync('dev-server.local.pem') ? '.local' : '.shared';
const devServer = ENV !== 'development' ? {} : {
const devServer = NODE_ENV !== 'development' ? {} : {
https: {
key: fs.readFileSync('dev-server' + certSuffix + '.pem'),
cert: fs.readFileSync('dev-server' + certSuffix + '.pem'),
@@ -177,32 +177,32 @@ const devServer = ENV !== 'development' ? {} : {
// host: '192.168.1.9',
proxy: {
'/api': {
target: envConfig['proxyApi'],
target: envConfig.dev?.proxyApi,
pathRewrite: {'^/api' : ''},
secure: false,
changeOrigin: true
},
'/identity': {
target: envConfig['proxyIdentity'],
target: envConfig.dev?.proxyIdentity,
pathRewrite: {'^/identity' : ''},
secure: false,
changeOrigin: true
},
'/events': {
target: envConfig['proxyEvents'],
target: envConfig.dev?.proxyEvents,
pathRewrite: {'^/events' : ''},
secure: false,
changeOrigin: true
},
'/notifications': {
target: envConfig['proxyNotifications'],
target: envConfig.dev?.proxyNotifications,
pathRewrite: {'^/notifications' : ''},
secure: false,
changeOrigin: true
},
},
hot: false,
allowedHosts: envConfig['allowedHosts']
allowedHosts: envConfig.dev?.allowedHosts,
};
const webpackConfig = {