Skip to content

Commit

Permalink
Use domain name instead of localhost when it's available to make webp…
Browse files Browse the repository at this point in the history
…ack works with local domain names
  • Loading branch information
noliveleger committed Oct 23, 2018
1 parent 20dcfb4 commit fe2157c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webpack/dev.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ const path = require('path');
const webpack = require('webpack');
const WebpackCommon = require('./webpack.common');
const BundleTracker = require('webpack-bundle-tracker');
var publicPath = 'http://kpi.kobo.local:3000/static/compiled/';
var isPublicDomainDefined = process.env.KOBOFORM_PUBLIC_SUBDOMAIN &&
process.env.PUBLIC_DOMAIN_NAME;
var publicDomain = isPublicDomainDefined ? process.env.KOBOFORM_PUBLIC_SUBDOMAIN
+ '.' + process.env.PUBLIC_DOMAIN_NAME : 'localhost';
var publicPath = 'http://' + publicDomain + ':3000/static/compiled/';

module.exports = WebpackCommon({
mode: "development",
Expand Down

0 comments on commit fe2157c

Please sign in to comment.