ImportsOptions
Extends
ExtractPluginOptions<typeofAutoImport>
Properties
biomelintrc?
optionalbiomelintrc?:BiomeLintrc
Generate corresponding .biomelintrc.json file.
Inherited from
ExtractPluginOptions.biomelintrc
defaultExportByFilename?
optionaldefaultExportByFilename?:boolean
Set default export alias by file name
Default
falseInherited from
ExtractPluginOptions.defaultExportByFilename
dirs?
optionaldirs?: (string|ScanDir)[]
Path for directories to be auto imported
Inherited from
ExtractPluginOptions.dirs
dirsScanOptions?
optionaldirsScanOptions?:Omit<ScanDirExportsOptions,"cwd">
Options for scanning directories for auto import
Inherited from
ExtractPluginOptions.dirsScanOptions
dts?
optionaldts?:string|boolean
Specifies the file path for generating the corresponding .d.ts file. This option is enabled by default when typescript is installed locally. Set to false to disable this feature.
Inherited from
ExtractPluginOptions.dts
dtsMode?
optionaldtsMode?:"overwrite"|"append"
Mode for generating the .d.ts file.
overwrite: overwrite the whole existing .d.ts file with the new type definitions.append: only append the new type definitions to the existing .d.ts file, means the existing type definitions will be kept.
Default
'append'Inherited from
ExtractPluginOptions.dtsMode
dtsPreserveExts?
optionaldtsPreserveExts?:boolean
Preserve the original file extensions in the generated .d.ts file. Set to true to keep the extensions for .ts and .tsx files.
Default
falseInherited from
ExtractPluginOptions.dtsPreserveExts
dumpUnimportItems?
optionaldumpUnimportItems?:string|boolean
Save unimport items into a JSON file for other tools to consume. Provide a filepath to save the JSON file.
When set to true, it will save to ./.unimport-items.json
Default
falseInherited from
ExtractPluginOptions.dumpUnimportItems
eslintrc?
optionaleslintrc?:ESLintrc
Generate corresponding .eslintrc-auto-import.json file.
Inherited from
ExtractPluginOptions.eslintrc
exclude?
optionalexclude?:FilterPattern
Rules to exclude transforming target.
Default
[/[\/]node_modules[\/]/, /[\/]\.git[\/]/]Inherited from
ExtractPluginOptions.exclude
ignore?
optionalignore?: (string|RegExp)[]
Identifiers to be ignored
Inherited from
ExtractPluginOptions.ignore
ignoreDts?
optionalignoreDts?: (string|RegExp)[]
These identifiers won't be put on the DTS file
Inherited from
ExtractPluginOptions.ignoreDts
imports?
optionalimports?:Arrayable<"vitepress"|ImportsMap|"@vue/composition-api"|"pinia"|"vue-demi"|"vue-i18n"|"vue-router-composables"|"vue"|"vue/macros"|"vitest"|"rxjs"|"date-fns"|"ahooks"|"@vueuse/core"|"@vueuse/math"|"@vueuse/head"|"mobx"|"mobx-react-lite"|"preact"|"quasar"|"react"|"react-dom"|"react-router"|"react-router-dom"|"react-i18next"|"svelte"|"svelte/animate"|"svelte/easing"|"svelte/motion"|"svelte/store"|"svelte/transition"|"vee-validate"|"vue-router"|"vue-router/composables"|"vuex"|"uni-app"|"solid-js"|"@solidjs/router"|"solid-app-router"|"jotai"|"jotai/utils"|"recoil"|InlinePreset>
Preset names or custom imports map
Default
[]Inherited from
ExtractPluginOptions.imports
include?
optionalinclude?:FilterPattern
Rules to include transforming target.
Default
[/\.[jt]sx?$/, /\.astro$/, /\.vue$/, /\.vue\?vue/, /\.vue\.[tj]sx?\?vue/, /\.svelte$/]Inherited from
ExtractPluginOptions.include
injectAtEnd?
optionalinjectAtEnd?:boolean
Inject the imports at the end of other imports
Default
trueInherited from
ExtractPluginOptions.injectAtEnd
packagePresets?
optionalpackagePresets?: (string|PackagePreset)[]
Local package presets.
Register local installed packages as a preset.
Default
[]See
https://github.com/unplugin/unplugin-auto-import#package-presets
Inherited from
ExtractPluginOptions.packagePresets
parser?
optionalparser?:"acorn"|"regex"
Parser to be used for parsing the source code.
See
https://github.com/unjs/unimport#acorn-parser
Default
'regex'Inherited from
ExtractPluginOptions.parser
resolvers?
optionalresolvers?:Arrayable<Arrayable<Resolver>>
Pass a custom function to resolve the component importing path from the component name.
The component names are always in PascalCase
Inherited from
ExtractPluginOptions.resolvers
viteOptimizeDeps?
optionalviteOptimizeDeps?:boolean
Include auto-imported packages in Vite's optimizeDeps option
Default
trueInherited from
ExtractPluginOptions.viteOptimizeDeps
vueDirectives?
optionalvueDirectives?:true|AddonVueDirectivesOptions
Enable auto import directives for Vue's SFC.
Library authors should include meta.vueDirective: true in the import metadata.
When using a local directives folder, provide the isDirective callback to check if the import is a Vue directive.
See
Inherited from
ExtractPluginOptions.vueDirectives
vueTemplate?
optionalvueTemplate?:boolean
Auto import inside Vue templates
See
Default
falseInherited from
ExtractPluginOptions.vueTemplate