Merge pull request #17 from MyEtherWallet/windows-run-build
Use `fs` library so even Windows users can run build.
This commit is contained in:
commit
e98ac4ac57
|
@ -1,16 +1,19 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
process.env.NODE_ENV = 'production'
|
process.env.NODE_ENV = 'production'
|
||||||
|
|
||||||
const exec = require('child_process').execSync
|
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
const ProgressPlugin = require('webpack/lib/ProgressPlugin')
|
const ProgressPlugin = require('webpack/lib/ProgressPlugin')
|
||||||
// const OfflinePlugin = require('offline-plugin')
|
// const OfflinePlugin = require('offline-plugin')
|
||||||
const base = require('./webpack.base')
|
const base = require('./webpack.base')
|
||||||
const config = require('./config')
|
const config = require('./config')
|
||||||
|
const fs = require('fs')
|
||||||
|
const distFolder = 'dist/';
|
||||||
|
|
||||||
|
|
||||||
exec('rm -rf dist/')
|
if (fs.existsSync(distFolder))
|
||||||
|
fs.rmdirSync(distFolder)
|
||||||
|
|
||||||
base.devtool = 'cheap-source-map'
|
base.devtool = 'cheap-source-map'
|
||||||
base.module.loaders.push(
|
base.module.loaders.push(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue