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

Commit

Permalink
refactor: merge nested if
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 24, 2021
1 parent 8b79815 commit d3070c6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ function nuxtVite () {
const { nuxt } = this
const viteOptions = nuxt.options.vite || {}

if (!nuxt.options.dev) {
// default false
if (!viteOptions.build) {
return
}
// Only enable for development or production if `build: true` is set
if (!nuxt.options.dev && !viteOptions.build) {
return
}

// Check nuxt version
Expand Down

0 comments on commit d3070c6

Please sign in to comment.