[ADF-799] add HappyPack to webpack conf (#1956)

This commit is contained in:
Eugenio Romano
2017-06-12 22:23:17 +01:00
committed by Eugenio Romano
parent 038a06d055
commit ccfb63b536
73 changed files with 423 additions and 58 deletions

View File

@@ -3,6 +3,7 @@ const helpers = require('./helpers');
const fs = require('fs');
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
var HappyPack = require('happypack');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
@@ -41,7 +42,7 @@ module.exports = {
},
{
test: /\.ts$/,
use: ['ts-loader', 'angular2-template-loader'],
loader: ['happypack/loader?id=ts', 'angular2-template-loader'],
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
},
{
@@ -88,6 +89,22 @@ module.exports = {
},
plugins: [
new HappyPack({
id: 'ts',
threads: 8,
loaders: [
{
path: 'ts-loader',
query: {
happyPackMode: true,
"compilerOptions": {
"paths": {}
}
}
}
]
}),
new CopyWebpackPlugin([{
from: `src/i18n/`,
to: `bundles/assets/${path.basename(helpers.root(''))}/i18n/`