Skip to content

Commit 0b8e274

Browse files
committed
fix: fix treeshake types for manual imports
Fixes #160
1 parent 08132cc commit 0b8e274

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Module } from '@nuxt/types'
22
import { Framework } from 'vuetify'
33

4-
import initOptions, { Options, VuetifyLoaderOptions } from './options'
4+
import initOptions, { Options, TreeShakeOptions, VuetifyLoaderOptions } from './options'
55
import setupBuild from './build'
66
import setupFont from './font'
77
import setupIcons from './icons'
@@ -33,6 +33,7 @@ const vuetifyModule: Module = function (moduleOptions?: Options) {
3333

3434
export {
3535
Options,
36+
TreeShakeOptions,
3637
VuetifyLoaderOptions
3738
}
3839

src/options.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ import { ModuleThis } from '@nuxt/types/config/module'
77
import { FontOptions } from './font'
88
import { IconPreset } from './icons'
99

10+
export interface TreeShakeOptions {
11+
components?: string[]
12+
directives?: string[]
13+
loaderOptions?: VuetifyLoaderOptions
14+
transitions?: string[]
15+
}
16+
1017
export interface VuetifyLoaderOptions {
1118
match?(originalTag: string, context: {
1219
kebabTag: string,
@@ -23,9 +30,7 @@ export interface Options extends Partial<VuetifyPreset> {
2330
icons?: IconPreset | false
2431
} | false
2532
optionsPath?: string
26-
treeShake?: boolean | {
27-
loaderOptions?: VuetifyLoaderOptions
28-
}
33+
treeShake?: boolean | TreeShakeOptions
2934
}
3035

3136
export const defaults = {

0 commit comments

Comments
 (0)