Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 18bd747

Browse files
committed
fix(nuxt): pass options
1 parent dc27c03 commit 18bd747

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/nuxt.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
import { PluginOptions } from './types'
12
import unplugin from '.'
23

3-
export default function(this: any) {
4+
export default function(this: any, options?: PluginOptions) {
45
// install webpack plugin
56
this.extendBuild((config: any) => {
67
config.plugins = config.plugins || []
7-
config.plugins.unshift(unplugin.webpack())
8+
config.plugins.unshift(unplugin.webpack(options))
89
})
910

1011
// install vite plugin
1112
this.nuxt.hook('vite:extend', async(vite: any) => {
1213
vite.config.plugins = vite.config.plugins || []
13-
vite.config.plugins.push(unplugin.vite())
14+
vite.config.plugins.push(unplugin.vite(options))
1415
})
1516
}

0 commit comments

Comments
 (0)