Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit fc5e912

Browse files
author
Nick Litwin
committed
Refactor variables
1 parent 03ddd8e commit fc5e912

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

webpack.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
require('./node_modules/coffee-script/register')
22

3-
if (process.env.TRAVIS_BRANCH == 'master') process.env.ENV = 'PROD'
4-
if (process.env.TRAVIS_BRANCH == 'qa-integration') process.env.ENV = 'QA'
5-
if (process.env.TRAVIS_BRANCH == 'dev') process.env.ENV = 'DEV'
3+
const CI = process.env.TRAVIS_BRANCH
64

7-
var config = require('appirio-tech-webpack-config')({
5+
if (CI == 'master') process.env.ENV = 'PROD'
6+
if (CI == 'qa-integration') process.env.ENV = 'QA'
7+
if (CI == 'dev') process.env.ENV = 'DEV'
8+
9+
const config = require('appirio-tech-webpack-config')({
810
dirname: __dirname,
911
entry: {
1012
app: './app/index'
@@ -16,6 +18,6 @@ var config = require('appirio-tech-webpack-config')({
1618
}
1719
})
1820

19-
if (process.env.TRAVIS_BRANCH) config.output.publicPath = process.env.ASSET_PREFIX
21+
if (CI) config.output.publicPath = process.env.ASSET_PREFIX
2022

2123
module.exports = config

0 commit comments

Comments
 (0)