Skip to content

Commit

Permalink
Fixed linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
justin808 committed Aug 21, 2017
1 parent d1c5834 commit a376450
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webpackConfigLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ function formatPublicPath(settings) {
const host = settings.dev_server.host;
const port = settings.dev_server.port;
const path = settings.public_output_path;
const hostWithHttp = `http://${host}:${port}`
const hostWithHttp = `http://${host}:${port}`;

let formattedHost = removeOuterSlashes(hostWithHttp);
if (formattedHost && !/^http/i.test(formattedHost)) {
formattedHost = `//${formattedHost}`;
}
const formattedPath = removeOuterSlashes(path);
return `${formattedHost}/${formattedPath}/`;
} else {
const formattedPath = removeOuterSlashes(settings.public_output_path);
return `//${formattedPath}/`;
}

const public_outer_path_without_outside_slashes = removeOuterSlashes(settings.public_output_path);
return `//${public_outer_path_without_outside_slashes}/`;
}

/**
Expand All @@ -48,7 +48,7 @@ function formatPublicPath(settings) {
*/
const configLoader = (configPath) => {
// Some test environments might not have the NODE_ENV set, so we'll have fallbacks.
const configEnv = (process.env.NODE_ENV || process.env.RAILS_ENV || 'development');
const configEnv = (env.NODE_ENV || env.RAILS_ENV || 'development');
const ymlConfigPath = join(configPath, 'webpacker.yml');
const settings = safeLoad(readFileSync(ymlConfigPath, 'utf8'))[configEnv];

Expand Down

0 comments on commit a376450

Please sign in to comment.