1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00

self host builds

This commit is contained in:
Kyle Spearrin
2018-06-30 14:14:52 -04:00
parent d509637623
commit c5d575b9b6
6 changed files with 123 additions and 92 deletions

View File

@@ -13,6 +13,10 @@ if (process.env.NODE_ENV == null) {
}
const ENV = process.env.ENV = process.env.NODE_ENV;
if (process.env.NODE_ENV == null) {
process.env.NODE_ENV = 'development';
}
const isVendorModule = (module) => {
if (!module.context) {
return false;
@@ -104,6 +108,7 @@ const plugins = [
new webpack.DefinePlugin({
'process.env': {
'ENV': JSON.stringify(ENV),
'SELF_HOST': JSON.stringify(process.env.SELF_HOST === 'true' ? true : false),
'APPLICATION_VERSION': JSON.stringify(pjson.version),
'CACHE_TAG': JSON.stringify(Math.random().toString(36).substring(7)),
}