Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
fix(webpack_config): use rimraf instead of rm rf
Browse files Browse the repository at this point in the history
fix(webpack_config): use rimraf instead of rm rf
  • Loading branch information
Metnew committed Oct 19, 2017
1 parent c720fc8 commit 18ba44f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
25 changes: 12 additions & 13 deletions webpack_config/client/webpack.base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path'
import childProcess from 'child_process'
import rimraf from 'rimraf'
import webpack from 'webpack'
import config from '../config'
import isomorphicWebpackConfig from '../webpack.isomorphic'
Expand All @@ -18,8 +18,7 @@ const {
manifest
} = config

const exec = childProcess.execSync
exec(`rm -rf ${CLIENT_DIST_PATH}`)
rimraf(`${config.distPath}/server`, {}, () => {})

const definePluginArgs = {
'process.env.GA_ID': JSON.stringify(GA_ID),
Expand Down Expand Up @@ -124,16 +123,16 @@ const baseBuild = {
inject: false,
// which icons should be generated (see https://github.com/haydenbleasel/favicons#usage)
icons: {
// android: true,
// appleIcon: true,
// appleStartup: true,
// coast: false,
// favicons: true,
// firefox: true,
// opengraph: false,
// twitter: true,
// yandex: false,
// windows: true
android: false,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: true,
yandex: false,
windows: false
}
}),
new WebpackAssetsManifest({
Expand Down
4 changes: 2 additions & 2 deletions webpack_config/server/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import config from '../config'
import isomorphicWebpackConfig from '../webpack.isomorphic'
const {SENTRY_DSN, CLIENT_DIST_PATH, JWT_SECRET, PORT, isProduction} = config

// Cleare dist dir before run
rimraf(`${config.distPath}/server/${APP_LANGUAGE}`, {}, () => {})
// Clear dist dir before run
rimraf(`${config.distPath}/server`, {}, () => {})

const definePluginArgs = {
'process.env.BROWSER': JSON.stringify(false),
Expand Down

0 comments on commit 18ba44f

Please sign in to comment.