Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Use Babel in vendor when needed #3419 (#3451)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac authored and jacogr committed Nov 15, 2016
1 parent 20185e5 commit 039bd3c
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions js/webpack.vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

const HappyPack = require('happypack');
const webpack = require('webpack');

const ENV = process.env.NODE_ENV || 'development';
Expand All @@ -22,10 +23,26 @@ const DEST = process.env.BUILD_DEST || '.build';

let modules = [
'babel-polyfill',
'browserify-aes', 'ethereumjs-tx', 'scryptsy',
'react', 'react-dom', 'react-redux', 'react-router',
'redux', 'redux-thunk', 'react-router-redux',
'lodash', 'material-ui', 'moment', 'blockies'
'bignumber.js',
'blockies',
'brace',
'browserify-aes',
'chart.js',
'ethereumjs-tx',
'lodash',
'material-ui',
'mobx',
'mobx-react',
'moment',
'react',
'react-dom',
'react-redux',
'react-router',
'react-router-redux',
'recharts',
'redux',
'redux-thunk',
'scryptsy'
];

if (!isProd) {
Expand All @@ -44,6 +61,11 @@ module.exports = {
{
test: /\.json$/,
loaders: ['json']
},
{
test: /\.js$/,
include: /(ethereumjs-tx)/,
loaders: [ 'happypack/loader?id=js' ]
}
]
},
Expand All @@ -63,6 +85,12 @@ module.exports = {
'process.env': {
NODE_ENV: JSON.stringify(ENV)
}
}),

new HappyPack({
id: 'js',
threads: 4,
loaders: ['babel']
})
];

Expand Down

0 comments on commit 039bd3c

Please sign in to comment.