Improve Build Speed (#188)

* Improve build speed by using cheap source maps and dropping eslint loader.

* use old 'source-map' on dev when SLOW_BUILD_SPEED env variable exists
This commit is contained in:
William O'Beirne 2017-09-13 12:56:20 -05:00 committed by Daniel Ternyak
parent f3b85b2aae
commit a5f2c5e2e9
3 changed files with 6 additions and 9 deletions

View File

@ -29,12 +29,6 @@ module.exports = {
},
module: {
loaders: [
{
test: /\.(js|jsx)$/,
enforce: 'pre',
loaders: ['eslint-loader'],
exclude: [/node_modules/]
},
{
test: /\.(js|jsx)$/,
loaders: ['babel-loader'],

View File

@ -5,7 +5,10 @@ const webpack = require('webpack');
const base = require('./webpack.base');
const FriendlyErrors = require('friendly-errors-webpack-plugin');
base.devtool = 'source-map';
base.devtool = process.env.SLOW_BUILD_SPEED
? 'source-map'
: 'cheap-module-eval-source-map';
base.module.loaders.push(
{
test: /\.css$/,

View File

@ -11,9 +11,9 @@ const rimraf = require('rimraf');
const distFolder = 'dist/';
// Clear out build folder
rimraf.sync(distFolder, {'rmdirSync': true});
rimraf.sync(distFolder, { rmdirSync: true });
base.devtool = 'cheap-source-map';
base.devtool = 'source-map';
base.module.loaders.push(
{
test: /\.css$/,