Skip to content

Commit

Permalink
fix: don't override vite config (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 1, 2022
1 parent bcaf777 commit e722d34
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fileURLToPath } from 'url'
import defu from 'defu'
import { resolve } from 'pathe'
import { defineNuxtModule, addPlugin } from '@nuxt/kit'
import { defineNuxtModule, addPlugin, extendViteConfig } from '@nuxt/kit'
import type { CookieOptions } from 'nuxt3/dist/app/composables/cookie'

export interface ModuleOptions {
Expand Down Expand Up @@ -77,11 +77,11 @@ export default defineNuxtModule<ModuleOptions>({
dirs.push(resolve(runtimeDir, 'composables'))
})

nuxt.options.vite = {
optimizeDeps: {
include: ['qs']
}
}
extendViteConfig((config) => {
config.optimizeDeps = config.optimizeDeps || {}
config.optimizeDeps.include = config.optimizeDeps.include || []
config.optimizeDeps.include.push('qs')
})
}
})

Expand Down

0 comments on commit e722d34

Please sign in to comment.