Skip to content

Commit

Permalink
delete dist only for production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fschade authored and kulmann committed May 3, 2022
1 parent d0dec60 commit ae2b0ac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ if (process.env.REQUIRE_TIMEOUT) {
}

const plugins = [
del({
runOnce: true,
targets: path.join('dist', '*'),
dot: true
}),
postcss({
extract: path.join('css', 'web.css'),
minimize: production,
Expand Down Expand Up @@ -181,6 +176,13 @@ const plugins = [

if (production) {
plugins.push(terser())
plugins.push(
del({
runOnce: true,
targets: path.join('dist', '*'),
dot: true
})
)
}

if (process.env.SERVER === 'true') {
Expand Down

0 comments on commit ae2b0ac

Please sign in to comment.