
const appName = '<%= Rails.application.class.parent_name.underscore %>';
const hauler = require('hauler');
const env = hauler.getEnvName();

const config = hauler.getCompilerConfig(env, __dirname, appName);
module.exports = config;


const hauler = require('hauler');

const env = hauler.getEnvName();
const railsRoot = __dirname;
const appName = hauler.getAppName(railsRoot);

module.exports = hauler.getCompilerConfig(env, railsRoot, appName);

use getAppName in webpack.config.js