|
|
@@ -3,7 +3,6 @@
|
|
|
*/
|
|
|
|
|
|
const webpack = require('webpack');
|
|
|
-const path = require('path');
|
|
|
const helpers = require('./helpers');
|
|
|
|
|
|
/*
|
|
|
@@ -44,8 +43,8 @@ module.exports = function(options) {
|
|
|
extensions: ['.js', '.json'],
|
|
|
modules: [helpers.root('src'), helpers.root('node_modules')],
|
|
|
alias: {
|
|
|
- '@root': path.resolve(__dirname, '../'),
|
|
|
- '@alias/logger': path.resolve(__dirname, '../lib/service/logger'),
|
|
|
+ '@root': helpers.root('/'),
|
|
|
+ '@alias/logger': helpers.root('lib/service/logger'),
|
|
|
// replace bunyan
|
|
|
'bunyan': 'browser-bunyan',
|
|
|
}
|
|
|
@@ -54,7 +53,13 @@ module.exports = function(options) {
|
|
|
rules: [
|
|
|
{
|
|
|
test: /.jsx?$/,
|
|
|
- exclude: /node_modules/,
|
|
|
+ exclude: {
|
|
|
+ test: helpers.root('node_modules'),
|
|
|
+ exclude: [ // include as a result
|
|
|
+ helpers.root('node_modules/string-width'),
|
|
|
+ helpers.root('node_modules/is-fullwidth-code-point'), // depends from string-width
|
|
|
+ ]
|
|
|
+ },
|
|
|
use: [{
|
|
|
loader: 'babel-loader?cacheDirectory',
|
|
|
options: {
|