Skip to content

Commit

Permalink
refactor!: remove deperecated autoImport
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 15, 2022
1 parent b0090d4 commit c99fa44
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 0 additions & 8 deletions src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@ export async function loadOptions (configOverrides: NitroConfig = {}): Promise<N
options.scanDirs = [options.srcDir]
}

// Backward compatibility for options.autoImports
// TODO: Remove in major release
if (options.autoImport === false) {
options.imports = false
} else if (options.imports !== false) {
options.imports = options.autoImport = defu(options.imports, options.autoImport)
}

if (options.imports && Array.isArray(options.imports.exclude)) {
options.imports.exclude.push(options.buildDir)
}
Expand Down
5 changes: 1 addition & 4 deletions src/types/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ export interface NitroOptions extends PresetOptions {
}
serverAssets: ServerAssetDir[]
publicAssets: PublicAssetDir[]
/**
* @deprecated Please use `imports` option
*/
autoImport: UnimportPluginOptions | false

imports: UnimportPluginOptions | false
plugins: string[]
virtual: Record<string, string | (() => string | Promise<string>)>
Expand Down

0 comments on commit c99fa44

Please sign in to comment.