Update webpack

This commit is contained in:
Jaco Greeff 2017-08-04 14:28:55 +02:00
parent 44a7c3d0b6
commit 49a4499d52
5 changed files with 30 additions and 19 deletions

View File

@ -68,7 +68,12 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules/,
use: ['happypack/loader?id=babel']
use: [ {
loader: 'happypack/loader',
options: {
id: 'babel'
}
} ]
},
{
test: /\.json$/,
@ -91,7 +96,7 @@ module.exports = {
{
loader: 'css-loader',
options: {
minimize: true
minimize: isProd
}
}
]
@ -108,14 +113,14 @@ module.exports = {
options: {
importLoaders: 1,
localIdentName: '[name]_[local]_[hash:base64:10]',
minimize: true,
minimize: isProd,
modules: true
}
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
sourceMap: isProd,
plugins: [
require('postcss-import'),
require('postcss-nested'),

View File

@ -44,7 +44,7 @@ module.exports = {
resolve: {
alias: {
'~': path.resolve(__dirname, '..')
}
},
@ -59,7 +59,12 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules/,
use: [ 'happypack/loader?id=babel' ]
use: [ {
loader: 'happypack/loader',
options: {
id: 'babel'
}
} ]
},
{
test: /\.json$/,

View File

@ -68,18 +68,9 @@ module.exports = {
},
resolve: {
alias: {
'~': path.resolve(__dirname, '..'),
'@parity/abi': path.resolve(__dirname, '../node_modules/@parity/abi'),
'@parity/api': path.resolve(__dirname, '../node_modules/@parity/api'),
'@parity/etherscan': path.resolve(__dirname, '../node_modules/@parity/etherscan'),
'@parity/jsonrpc': path.resolve(__dirname, '../node_modules/@parity/jsonrpc'),
'@parity/shared': path.resolve(__dirname, '../node_modules/@parity/shared'),
'@parity/ui': path.resolve(__dirname, '../node_modules/@parity/ui'),
'@parity/wordlist': path.resolve(__dirname, '../node_modules/@parity/wordlist'),
'@parity': path.resolve(__dirname, '../packages')
'~': path.resolve(__dirname, '..')
},
modules: [
path.resolve('./src'),
path.join(__dirname, '../node_modules')
],
extensions: ['.json', '.js', '.jsx']

View File

@ -17,5 +17,10 @@
module.exports = {
test: /\.js$/,
include: /node_modules\/(get-own-enumerable-property-symbols|ethereumjs-tx|stringify-object)/,
use: [ 'happypack/loader?id=babel' ]
use: [ {
loader: 'happypack/loader',
options: {
id: 'babel'
}
} ]
};

View File

@ -17,5 +17,10 @@
module.exports = {
test: /\.js$/,
include: /node_modules\/@parity\//,
use: [ 'happypack/loader?id=babel' ]
use: [ {
loader: 'happypack/loader',
options: {
id: 'babel'
}
} ]
};