unplugin-auto-import
Advanced tools
Comparing version 0.2.7 to 0.3.0
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkRFOEC56Bjs = require('./chunk-RFOEC56B.js'); | ||
var _chunkJGVEJWHJjs = require('./chunk-JGVEJWHJ.js'); | ||
require('./chunk-T5OU4655.js'); | ||
exports.default = _chunkRFOEC56Bjs.src_default; | ||
exports.default = _chunkJGVEJWHJjs.src_default; |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkRFOEC56Bjs = require('./chunk-RFOEC56B.js'); | ||
var _chunkJGVEJWHJjs = require('./chunk-JGVEJWHJ.js'); | ||
require('./chunk-T5OU4655.js'); | ||
@@ -11,7 +11,7 @@ | ||
config.plugins = config.plugins || []; | ||
config.plugins.unshift(_chunkRFOEC56Bjs.src_default.webpack(options)); | ||
config.plugins.unshift(_chunkJGVEJWHJjs.src_default.webpack(options)); | ||
}); | ||
this.nuxt.hook("vite:extend", async (vite) => { | ||
vite.config.plugins = vite.config.plugins || []; | ||
vite.config.plugins.push(_chunkRFOEC56Bjs.src_default.vite(options)); | ||
vite.config.plugins.push(_chunkJGVEJWHJjs.src_default.vite(options)); | ||
}); | ||
@@ -18,0 +18,0 @@ } |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkRFOEC56Bjs = require('./chunk-RFOEC56B.js'); | ||
var _chunkJGVEJWHJjs = require('./chunk-JGVEJWHJ.js'); | ||
require('./chunk-T5OU4655.js'); | ||
// src/rollup.ts | ||
var rollup_default = _chunkRFOEC56Bjs.src_default.rollup; | ||
var rollup_default = _chunkJGVEJWHJjs.src_default.rollup; | ||
@@ -9,0 +9,0 @@ |
@@ -32,2 +32,6 @@ import { Arrayable } from '@antfu/utils'; | ||
/** | ||
* Given a identifier name, returns the import path or an importInfo object | ||
*/ | ||
declare type Resolver = (name: string) => string | ImportInfo | null | undefined | void; | ||
/** | ||
* module, name, alias | ||
@@ -48,2 +52,8 @@ */ | ||
/** | ||
* Pass a custom function to resolve the component importing path from the component name. | ||
* | ||
* The component names are always in PascalCase | ||
*/ | ||
resolvers?: Resolver | Resolver[]; | ||
/** | ||
* Filepath to generate corresponding .d.ts file. | ||
@@ -83,4 +93,7 @@ * Default enabled when `typescript` is installed locally. | ||
imports: ImportsFlatMap; | ||
matchRE: RegExp; | ||
/** | ||
* Custom resolvers | ||
*/ | ||
resolvers?: Resolver[]; | ||
/** | ||
* Generate source map. | ||
@@ -91,4 +104,8 @@ * | ||
sourceMap?: boolean; | ||
/** | ||
* Hold the value for dynamic resolved imports, will be mutated during transforming | ||
*/ | ||
resolvedImports?: ImportsFlatMap; | ||
} | ||
interface ResolvedOptions extends Omit<Options, 'imports' | 'dts'>, TransformOptions { | ||
interface ResolvedOptions extends Omit<Required<Options>, 'imports' | 'resolvers' | 'dts' | 'include' | 'exclude'>, Required<TransformOptions> { | ||
idFilter: (id: string) => boolean; | ||
@@ -98,2 +115,2 @@ dts: string | false; | ||
export { ImportInfo, ImportNameAlias, ImportsFlatMap, ImportsMap, Options, PresetName, ResolvedOptions, TransformOptions }; | ||
export { ImportInfo, ImportNameAlias, ImportsFlatMap, ImportsMap, Options, PresetName, ResolvedOptions, Resolver, TransformOptions }; |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkRFOEC56Bjs = require('./chunk-RFOEC56B.js'); | ||
var _chunkJGVEJWHJjs = require('./chunk-JGVEJWHJ.js'); | ||
require('./chunk-T5OU4655.js'); | ||
// src/vite.ts | ||
var vite_default = _chunkRFOEC56Bjs.src_default.vite; | ||
var vite_default = _chunkJGVEJWHJjs.src_default.vite; | ||
@@ -9,0 +9,0 @@ |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkRFOEC56Bjs = require('./chunk-RFOEC56B.js'); | ||
var _chunkJGVEJWHJjs = require('./chunk-JGVEJWHJ.js'); | ||
require('./chunk-T5OU4655.js'); | ||
// src/webpack.ts | ||
var webpack_default = _chunkRFOEC56Bjs.src_default.webpack; | ||
var webpack_default = _chunkJGVEJWHJjs.src_default.webpack; | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "unplugin-auto-import", | ||
"version": "0.2.7", | ||
"version": "0.3.0", | ||
"description": "Register global imports on demand for Vite and Webpack", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -163,2 +163,8 @@ # unplugin-auto-import | ||
], | ||
// custom resolvers | ||
// see https://github.com/antfu/unplugin-auto-import/pull/23/ | ||
resolvers: [ | ||
/* ... */ | ||
] | ||
}) | ||
@@ -165,0 +171,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
37475
1079
205
0