mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 03:26:14 +00:00
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:
parent
f3b85b2aae
commit
a5f2c5e2e9
@ -29,12 +29,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{
|
|
||||||
test: /\.(js|jsx)$/,
|
|
||||||
enforce: 'pre',
|
|
||||||
loaders: ['eslint-loader'],
|
|
||||||
exclude: [/node_modules/]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
test: /\.(js|jsx)$/,
|
test: /\.(js|jsx)$/,
|
||||||
loaders: ['babel-loader'],
|
loaders: ['babel-loader'],
|
||||||
|
@ -5,7 +5,10 @@ const webpack = require('webpack');
|
|||||||
const base = require('./webpack.base');
|
const base = require('./webpack.base');
|
||||||
const FriendlyErrors = require('friendly-errors-webpack-plugin');
|
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(
|
base.module.loaders.push(
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
|
@ -11,9 +11,9 @@ const rimraf = require('rimraf');
|
|||||||
const distFolder = 'dist/';
|
const distFolder = 'dist/';
|
||||||
|
|
||||||
// Clear out build folder
|
// 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(
|
base.module.loaders.push(
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user