Skip to content

Commit

Permalink
Merge branch 'master' into feature/redux
Browse files Browse the repository at this point in the history
  • Loading branch information
langpavel committed Mar 25, 2018
2 parents 5787cec + 454efa6 commit 020e25b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import overrideRules from './lib/overrideRules';
import pkg from '../package.json';

const ROOT_DIR = path.resolve(__dirname, '..');
const SRC_DIR = `${ROOT_DIR}/src`;
const BUILD_DIR = `${ROOT_DIR}/build`;
const NODE_MODULES_DIR = `${ROOT_DIR}/node_modules`;
const resolvePath = (...args) => path.resolve(ROOT_DIR, ...args);
const SRC_DIR = resolvePath('src');
const BUILD_DIR = resolvePath('build');

const isDebug = !process.argv.includes('--release');
const isVerbose = process.argv.includes('--verbose');
Expand Down Expand Up @@ -49,7 +49,7 @@ const config = {
mode: isDebug ? 'development' : 'production',

output: {
path: `${BUILD_DIR}/public/assets`,
path: resolvePath(BUILD_DIR, 'public/assets'),
publicPath: '/assets/',
pathinfo: isVerbose,
filename: isDebug ? '[name].js' : '[name].[chunkhash:8].js',
Expand All @@ -75,7 +75,7 @@ const config = {
// Rules for JS / JSX
{
test: reScript,
include: [SRC_DIR, `${ROOT_DIR}/tools`],
include: [SRC_DIR, resolvePath('tools')],
loader: 'babel-loader',
options: {
// https://github.com/babel/babel-loader#options
Expand Down Expand Up @@ -254,7 +254,9 @@ const config = {
? []
: [
{
test: `${NODE_MODULES_DIR}/react-deep-force-update/lib/index.js`,
test: resolvePath(
'node_modules/react-deep-force-update/lib/index.js',
),
loader: 'null-loader',
},
]),
Expand Down

0 comments on commit 020e25b

Please sign in to comment.