Changelog
[1.4.1] - 2026-09-16
Fixed generatePages / generateUni handling of custom page extensions (e.g. .uvue), so uni-app x projects can use .uvue pages normally.
Fixed
- File extension left in pages.json paths: the page-path stripping logic was hard-coded to
.vue/.nvue; withincludeExtensionsset to custom extensions like.uvue, it produced wrong paths such aspages/home/index.uvuethat uni-app can't resolve. Stripping is now driven by the actual file extension matched against theincludeExtensionslist (case-insensitive, leading dot tolerated), preserving the previous.vue/.nvuebehavior when the option is unset defineUniPagecalls not stripped in.uvuepages: SFC script virtual-module detection was changed fromid.includes('.vue')to/\.(vue|uvue|nvue)(\?|$)/, covering.uvue/.nvue; the macro call is now removed at transform time, avoiding a runtimeReferenceError. Fixed in both generatePages and generateUni
[1.4.0] - 2026-08-28
Added the defineUniPage macro and refactored the page generation pipeline: page scanning → pages.json → route config as one flow, with shared DirectoryWatcher / TaskQueue for unified watching and serial generation. Plugin count grows to 17.
Added
defineUniPagemacro: call it in<script setup>(or at the top level of<script>); works the same as the<route-config>custom block, with a more JS/TS-friendly syntax- When both the macro and
<route-config>are declared on the same page, the macro wins (top-level fields are overridden by the macro) - Argument is a JS object literal supporting comments, single quotes, trailing commas, and nested objects (
tab/style/meta) - Runtime footprint-free: consumed during scanning, the call is removed automatically at build time — no need to import
- Auto-generates the global type declaration
src/define-uni-page.d.ts(path configurable viadts, orfalseto disable); recognized out of the box by Vue (Official) / Volar / tsc
- When both the macro and
<route-config>custom block: parsing now supports JSONC trailing commas (consistent with thelang="jsonc"IDE highlighting semantics)- Shared modules:
DirectoryWatcher(common/fs — recursive directory watching, unified multi-directory management, gracefully skips with a warning when the platform doesn't supportrecursive),TaskQueue(common/concurrency — serial task queue where a single task failure doesn't block the rest) - factory: added the
FunctionHookMaptype (hook-name generic constraint tightened to function-only hooks) and an overridablegetBaseDefaults()method
Enhanced
- generatePages / generateUni refactor: extracted the shared
producePages()pipeline (scan pages +<route-config>/defineUniPage→ assemble → merge, produced in memory without writing to disk); generateUni passes data to stage two in memory, eliminating the write-then-read round trip - Watching & serialization unified: generatePages / generateUni / generateRouter all use
TaskQueuefor serial generation andDirectoryWatcherfor page-directory watching, avoiding read-write races on high-frequency changes
Fixed
- The
<route-config>virtual-module request matching in generatePages / generateUni was tightened fromid.includes('vue')toid.includes('?vue'), avoiding false interception
[1.3.0] - 2026-08-26
Added the generateUni combined entry plugin — one pipeline for "scan pages → pages.json → route config". Plugin count grows to 17.
Added
generateUniplugin: orchestratesgeneratePagesandgenerateRouterinto one pipeline, equivalent to using both plugins together (both standalone plugins remain available unchanged)- Stage one scans pages +
<route-config>and produces pages data in memory, writing pages.json; stage two consumes that in-memory data directly to generate route config (+ optional dts), avoiding the disk round trip - Config groups: top-level common options (
pagesJsonPath/watch) + apagessub-object (generatePages options) + aroutersub-object (generateRouter options), instead of 20+ flat options - On page-directory changes it re-runs "stage one + stage two" serially, avoiding concurrent read-write races
- Intercepts
<route-config>virtual-module requests and serves an empty module, preventing them from being parsed as JavaScript during build - Fully inherits generatePages' tabBar collection / subpackage / merge strategies and generateRouter's preserveRouteChanges / metaMapping / dts, etc.
- Stage one scans pages +
- Sub-path export:
plugins/generate/generate-uniexportsgenerateUniand theGenerateUniOptionstype;plugins/generatere-exports it
Enhanced
- generatePages: added
<route-config>virtual-module interception for standalone use (aligned with generateUni), preventing production builds from parsing the block content as JavaScript - proxyManager:
confighook now interceptsenv.command === 'build', fully skipping proxy-rule loading and config generation during builds (proxies only apply to the dev server — previously builds wasted time loading rules and printed misleading logs)
[1.2.0] - 2026-08-25
Added the generatePages plugin, which scans Vue files + <route-config> custom blocks to dynamically generate pages.json. Plugin count grows to 16.
Added
generatePagesplugin: scans the pages directory and<route-config>custom blocks to generate / update pages.json (pages/subPackages/tabBar)- Main-package pages are generated by recursive scanning with stable path ordering; subpackage pages via
subPackages: [{ root, dir }] entryPagepinspages[0]as the launch page, immune to alphabetical reordering- Tab pages are collected into
tabBar.listwhen declared withisTab+ atabBartemplate, sorted bytab.order - Merge strategy only overrides the pages section, preserving
globalStyle/condition, etc. watch: true(default) regenerates automatically when page files change- Options:
pagesJsonPath/pagesDir/subPackages/routeConfigBlock/titleFallback/tabBar/includeExtensions/excludePatterns/watch
- Main-package pages are generated by recursive scanning with stable path ordering; subpackage pages via
<route-config>custom block: declaretitle(mapped tonavigationBarTitleText) /name/style/meta/isTab/tabnext to the page- Sub-path export:
plugins/generate/generate-pagesexportsgeneratePagesand types (GeneratePagesOptions/RouteConfigBlock/SubPackageConfig/TabBarTemplate/TabBarItemOverride/ScannedPage);plugins/generatere-exports them
Enhanced
- Type completion:
TabBarItemOverrideis reused as the element type ofoverrides, consistent with the page-leveltab; theorderMainPagessorting function moved into thehelpersdirectory
[1.1.0] - 2026-07-28
Full autoImport refactor: built-in presets, multiple import forms, HMR, lint-config generation, and a caching mechanism.
Changed (breaking)
- Removed the
ImportMapping/ResolvedImporttypes — useInlineImportConfig/ImportInlineinstead - Removed
AutoImportOptions.fileFilter— useinclude/excludeordirsScanOptions.fileFilterinstead - Removed the
helpers/compat.tscompatibility module (legacy format no longer supported) - Removed functions:
migrateLegacyOptions/resolvedImportToInline/inlineToResolvedImport/importMappingToInlines
Added
- Built-in presets:
imports: ['vue', 'vue-router', 'pinia', 'vue-i18n']to enable common libraries in one line - Multiple import forms: alias imports, type imports (
type: truegeneratesimport type), namespace imports ('*'), export-assignment imports ('=') - Directory scan enhanced:
dirssupportsDirConfigObject, glob patterns, and type markers - DTS modes:
dtsMode: 'append' | 'overwrite'(append only adds new types),dtsPreserveExtskeeps file extensions - Vue directive auto-import:
vueDirectivesauto-detects custom directives - Lint globals generation:
eslintrc/biomelintrcgenerate globals config, resolvingno-undeferrors - Caching:
cachecaches preset resolution and file-scan results for faster builds - HMR: automatically re-initializes when scanned directory files change
- Comment disable:
// @unimport-disabledisables auto-import per file or per line - Custom resolvers:
resolversfor custom resolution of unmatched identifiers - Package presets:
packagePresetsauto-discovers exports from the.d.tsof installed packages - Vite optimizeDeps integration:
viteOptimizeDepsautomatically adds dependencies to Vite's pre-bundling list - DTS ignore filter:
ignoreDtsexcludes specified identifiers - New exports:
resolveImportsConfig/buildNameLookup/findPreset/expandPreset/resolvePackagePreset/generateEslintrc/generateBiomelintrc
Enhanced
- Resolver fallback always tries unmatched identifiers; DTS generation dedupes (avoids redundant writes between
initialize()andbuildEnd);resolveImportsConfiguniformly handles preset strings, Records, and Inline formats; wildcard exports are resolved from.d.tsfirst (most accurate), falling back to the runtime entry
[1.0.0] - 2026-06-27
First stable release — API stability commitment and production-readiness milestone.
Added
- After 27 iterations in the 0.x series (0.0.1 - 0.2.7), the plugin set grew from 2 to 15 (7 groups) covering the full build lifecycle; common utilities converged into 14 normalized submodules; the plugin development framework (BasePlugin / Logger / Validator / createPluginFactory) matured
- API stability commitment: strictly follows semantic versioning from here on; breaking changes require a major version bump
- Stable sub-path exports: backward-compatible main entry + 7 groups + 15 per-plugin sub-paths + 14 common submodules + factory / logger
- Production readiness: supports Vite 5.x - 7.x (
peerDependencies: vite >=5.0.0 <8.0.0), dual ESM (.mjs) / CJS (.cjs) output, complete TypeScript types, graceful degradation whensharp/svgoare unavailable, all plugins usable with zero config
[0.2.7] - 2026-06-26
Grouped plugin exports by feature; fixed a type-annotation defect in generateRouter.
Added
- Grouped plugin exports: the 15 plugins are grouped into 7 categories (analyze / compress / copy / generate / guard / inject / proxy), each with its own sub-path export (e.g.
./plugins/compress) for on-demand imports and tree-shaking; the./pluginsmain entry stays backward-compatible and per-plugin sub-paths are also available
Fixed
- generateRouter still emitted the
: RouteConfig[]type annotation whenexportTypes: falsewithout the corresponding import statement, causing "RouteConfig is not defined" — the annotation is now only added when type export is enabled
[0.2.6] - 2026-06-25
Extracted shared utilities and unified the architecture; automated the version-injection mechanism.
Added
- 6 new common submodules:
code(JS_KEYWORDS/stripCommentsAndStrings),compress(calculateGzipSize),env(parseEnvContent),hash(generateRandomHash),object(deepMerge),string(toCamelCase/toPascalCase/stripJsonComments/escapeRegex) - common/format: added
parsePluginTemplate, supporting{name}/{date}/{date:FORMAT}/{version}/{custom:KEY}placeholders for unified comment-header template handling
Refactored
- Version-injection mechanism: removed the manual version-sync logic; the version is now auto-injected at build time via the unbuild
replaceconfig as the__PLUGIN_VERSION__global, with the newsrc/types/global.d.tsdeclaration; the{version}placeholder in the generateRouter comment header no longer needs source changes when bumping versions - Plugin directory structure: each plugin's
common/directory was renamed tohelpers/, and type files consolidated into the plugin root (internal-only change; no impact on import paths)
Optimized
- versionUpdateChecker now uses the shared
parseTemplateWithDelimiterfor custom prompt templates, replacing repeated chained.replace()calls and manual concatenation
[0.2.5] - 2026-06-24
Template-based comment headers for generateRouter; removed a deprecated function.
Changed (breaking)
- Removed the
fileHeaderoption, replaced byheaderTemplate: upgraded from abooleanswitch to aboolean | stringtemplate whose content is freely composed with placeholders
Added
- Comment-header template system:
headerTemplatesupports{name}/{date}(defaultYYYY-MM-DD HH:mm:ss) /{date:format}/{version}/{custom:key}placeholders, ordered by their position in the template - Custom fields
customFields:Record<string, string>, referenced by the{custom:key}placeholder - Changed:
plugins/generate-routerremovedfileHeaderand addedheaderTemplate/customFields
Removed
- Removed the deprecated
serializeValueCompactfrom common/code-manipulation (useserializeValue(value, true)instead)
[0.2.4] - 2026-06-23
generateRouter added page-name configuration and optimized the route-merge strategy.
Added
- Page name
namefield:UniAppPageConfiggained anameproperty so route names can be configured directly in pages.json, taking precedence over thenameStrategy-generated name
Optimized
preserveRouteChangesmerge strategy: pages.json is the single source of truth for auto-generated fields;nameandmetafields coming from pages.json always use the new values, while only user-defined extra fields are preserved
[0.2.3] - 2026-06-23
Completed the plugin base class and the route-generation plugin.
Added
- Page meta
metafield:UniAppPageConfiggained ametaproperty taking precedence overmetaMapping; extraction priority ispageConfig.meta>metaMappingmapping > tabBar inference
Refactored
- BasePlugin:
addPluginHookschanged from an abstract method to a virtual method (empty default), so plugins that don't rely on Vite hooks no longer need to write an empty implementation - generateRouter: route-generation logic migrated from the
configResolvedhook to the base classonConfigResolvedlifecycle for unified lifecycle management
[0.2.2] - 2026-06-21
generateRouter fixed missing commas between properties and an indentation error in multi-line output.
Fixed
- Multi-line route objects were missing commas between properties, producing invalid
router.config.tssyntax - Non-first-line properties in multi-line output were indented by an extra tab, causing inconsistent formatting
[0.2.1] - 2026-06-21
generateRouter added file comment headers and output-format optimization, fixed lost merges in preserveRouteChanges, and removed redundant type definitions.
Added
- File comment header
fileHeader: prepends a standardized comment header (@plugin/@datewith time /@version) to the generated file; the version tracks the npm package version automatically - Multi-line output: route objects switched from compact single-line to one-property-per-line for readability
- External type import: removed inline type definitions in favor of
import type { RouteConfig } from '@meng-xi/uni-router'; types are provided uniformly by uni-router
Fixed
preserveRouteChangesreplacedmetawholesale, dropping user-defined fields — now per-field merged, only updating / adding new fields- A single route with function properties (e.g.
beforeEnter) failing JSON.parse aborted merging for all routes — now only that route is skipped and the rest merge normally
Changed (breaking)
- Removed the
UniAnimationType/NavigationAnimationtype exports and theRouteMeta.animationfield, now provided by@meng-xi/uni-router(import them from uni-router where needed)
[0.2.0] - 2026-06-18
Added the proxyManager dev proxy plugin, extracted shared utilities into the Common modules, and fixed four critical proxyManager defects.
Added
proxyManagerplugin: dev-server proxy management that registers a proxy middleware atconfigureServerstartup- Path matching: string prefixes and regular expressions
- Request rewriting (
rewrite) and response modification (modifyResponse) - Delay simulation: fixed milliseconds or a random range (
{ min, max }) envPrefixreads proxy targets fromprocess.envfor multi-environment switching with one codebase- Rule files:
.proxyrc.ts/.proxyrc.js/.proxyrc.mjs, ESM and CJS compatible - Three request-log levels (
none/basic/verbose), WebSocket proxying (ws: true), and anenvfield to scope rules to specific environments - Options:
rules/configFile/logLevel/defaultDelay/envPrefix
- common/format: added
parseTemplateWithDelimiter(custom left/right delimiters; regex special chars in keys and values auto-escaped) - common/fs: added
scanAndMapFiles(encapsulates "scan + filter + map") anddeleteFiles(batch delete, silently ignores failures)
[0.1.9] - 2026-06-14
generateRouter added navigation-animation support and enhanced route-attribute preservation.
Added
- Navigation animation types:
UniAnimationType(18 animation values) andNavigationAnimation(type+duration) - Route meta:
RouteMetagained ananimationfield for the page-level default navigation animation (App only) - Route config extension:
RouteConfiggained the index signature[key: string]: unknown, supporting custom properties likebeforeEnter/component
Enhanced
preserveRouteChanges: text-based merging that fully preserves user-added function properties and custom attributes;pathalways follows pages.json, whilename/metaprefer user edits and auto-append newly added pages.json fields
[0.1.8] - 2026-06-11
Added the imageOptimizer image-optimization plugin, the common/concurrency module, and restored the common/path module.
Added
imageOptimizerplugin: scans the output directory after build (writeBundle,enforce: 'post') and optimizes images- Multi-format compression: JPEG (mozjpeg) / PNG (palette) / WebP / AVIF / GIF / TIFF / SVG (svgo)
- Format conversion:
convertToWebp/convertToAvifshortcuts and customconvertMapping - Concurrency (
parallelLimit), streaming memory control, atomic writes, size-conserving (only replaces when smaller), graceful degradation when sharp/svgo are unavailable - JSON optimization report (grouped by format + Top 5 compression ratios) and instance methods
getStats()/getSummary()
- common/concurrency: added
runWithConcurrency(worker-pool concurrency, results ordered like the input) - common/path restored:
normalizePath/isExtensionIncluded/isPathExcluded/isPreCompressed - common/format: added
calcRatio - common/fs: added
resolveReportPath
[0.1.7] - 2026-06-08
Added the assetManifest asset-manifest generation plugin.
Added
assetManifestplugin: scans the output directory after build (writeBundle,enforce: 'post') and generates an asset mapping manifest- Three output formats:
vite/webpack/custom(custom formatter) - Grouping by entry (
groupByEntry) and runtime injection (injectRuntime, injecting the mapping as a global before</head>) - File filtering (
includeExtensions/excludeExtensions/excludePaths),publicPathprefix for CDN deployments, and path-conflict detection warnings - Instance methods:
getAssetMap()/getManifest()/getGroups()
- Three output formats:
[0.1.6] - 2026-06-07
autoImport added wildcard imports; generateRouter added route type-declaration generation; common modules gained new utilities; plugin code normalized.
Added
- autoImport wildcard imports:
importssupports'*'to import all named exports of a module, resolved from.d.tsfirst (most accurate) with a runtime-entry fallback - Vue SFC injection: added
injectIntoScriptSetupto inject imports into<script setup>, resolving coordination issues with the Vue SFC compiler underenforce: 'pre' - generateRouter route type declarations: added the
dtsoption (false/true→ defaultsrc/router.d.ts/ custom path) generating TSDoc-commented declarations that extend theRouteNameMapinterface of@meng-xi/uni-routerfor type-safe navigation - common/format:
parseTemplate(placeholders,$-safe),formatDate - common/fs:
writeFileSyncSafely(sync write that creates missing directories),shouldUpdateFileContent(reduces file IO) - common/html:
escapeHtmlAttr(prevents attribute injection)
Fixed
transformwithenforce: 'post'broke bare-module identifier resolution — reverted toenforce: 'pre'- The default
fileFilterdidn't excludenode_modules, so library files were processed and injected with wrong imports vue: ['*']resolved via the runtime entry (onlyexport { compile }), yielding justcompilemakeCallback's anonymous function broke as a function declaration — switched to an IIFE- An unused variable in the
moduleMaploop
Refactored
- Plugins extracted non-core logic / constants into
common/subdirectories with aggregated exports (buildProgress / generateRouter / envGuard / faviconManager / htmlInject / loadingManager / versionUpdateChecker)
[0.1.5] - 2026-06-06
Added the autoImport plugin; slimmed the Common modules (removed compress, object, path); fixed the dts declaration file not being generated in dev mode.
Added
autoImportplugin: detects identifiers used in the code and injects the corresponding import statements (defaultenforce: 'post')- Preset mapping (
imports, supportingRecord<string, string[]>andImportMapping[]), directory scanning (dirs, recursive, skipping node_modules), Vue template support (vueTemplate) - Declaration generation (
dts, defaultauto-imports.d.ts), identifier ignore (ignore), file filtering (fileFilter), injection position (injectAtPosition:'top'/'after-last-import')
- Preset mapping (
Changed (breaking)
- Removed modules used fewer than 2 times:
common/compress(calculateGzipSizeinlined into bundleAnalyzer),common/object(deepMergeinlined into loadingManager),common/path(isNodeModuleinlined into bundleAnalyzer), plus functions and types used only once - Kept 6 core modules:
format/fs/html/script/ui/validation
[0.1.4] - 2026-06-03
Added the envGuard environment-variable validation plugin and the @common/ui terminal-UI module.
Added
envGuardplugin: validates environment variables before build (enforce: 'post'for runtime-guard injection)- 8 value-type checks (
string/number/url/boolean/enum/json/semver/path), range (minValue/maxValue) and length (minLength/maxLength) constraints, regex matching (pattern), custom validators (validator) failActionthree modes (error/warn/ignore),.envtemplate generation (generateTemplate), runtime guards (console/throw/overlay),autoLoadEnv, JSON validation report, and terminal summary
- 8 value-type checks (
- @common/ui module:
ANSI(cursor control & colored text),SPINNER_FRAMES(spinner frames),stripAnsi
Enhanced
- @common/validation: added the
EnvType/EnvFieldRule/EnvValidationResult/STRING_LIKE_TYPEStypes and thevalidateType/validateRange/validateLength/validateValue/validateEnvironmentfunctions
[0.1.3] - 2026-06-01
Added the bundleAnalyzer build-output analysis plugin and the @common/compress and @common/path modules.
Added
bundleAnalyzerplugin: analyzes build output after build (writeBundle,enforce: 'post')json/html/bothreports, gzip size (level 9), threshold warnings (sizeThreshold, 2× threshold flagged critical)- Comparison against historical reports (size trend), treemap / sunburst / list chart views, Top N module ranking, file-type distribution,
openAnalyzerauto-open
- @common/compress:
calculateGzipSize(gzip-compressed size, level 9) - @common/path:
isNodeModule(detects node_modules /\0/virtual:prefixes)
Enhanced
- @common/format:
escapeHtmlAttr(XSS escaping),formatFileSize(human-readable sizes),getExtension - @common/fs:
scanDirectory(recursive scan + filtering),writeJsonReport, and theScannedFile/ScanDirectoryOptionstypes
[0.1.2] - 2026-05-31
Added the compressAssets build-output compression plugin; all plugin options are now optional; added @common/object and full @common/fs utilities.
Added
compressAssetsplugin: compresses output with gzip / brotli / both after build (writeBundle,enforce: 'post'), generating.gz/.brfiles- File filtering (
includeExtensions/excludeExtensions/excludePaths), compression threshold (threshold), concurrent compression (parallelLimit) deleteOriginalFile, JSON compression report (reportOutput), Top 5 compression-ratio log, cross-platform path handling
- File filtering (
- @common/object: added
deepMerge(skips undefined, recursive merge, arrays replaced)
Enhanced
- All plugin options made optional: options with defaults are now
?-optional — zero-config usage (BuildProgressOptions / CompressAssetsOptions / CopyFileOptions / FaviconManagerOptions / GenerateRouterOptions / GenerateVersionOptions / VersionUpdateCheckerOptions / HtmlInjectOptions / LoadingManagerOptions) - @common/fs:
checkSourceExists/ensureTargetDir/fileExists/copySourceToTarget(recursive / overwrite / incremental / concurrent) /writeFileContent/readFileContentplus theCopyOptions/CopyResulttypes - @common/format:
generateRandomHash/formatDate/parseTemplate/toCamelCase/toPascalCase/stripJsonComments/DateFormatOptions - BasePlugin:
mergeOptionsnow usesdeepMerge; added thevalidatorproperty,getEnforce()method,onConfigResolved(config)lifecycle, andhandleError(error, context);toPluginauto-registersconfigResolvedandcloseBundle
[0.1.1] - 2026-05-30
Added the htmlInject HTML-injection plugin, new shared utilities and types, and enum / numeric-range validation to Validator.
Added
htmlInjectplugin: injects custom HTML per rules into the target HTML file (transformIndexHtml,order: 'post')- 7 injection positions (
head-start/head-end/body-start/body-end/before-selector/after-selector/replace-selector) - Conditional injection (
env/file-contains/custom, withnegate), selector matching (string/regex) - Template-variable replacement (
, rule-level overrides globals),priorityrule ordering - Security filtering (blocks dangerous tags / event attributes,
allowedTagswhitelist),allowScriptInjectionskips checks with a warning,logInjectionlogs
- 7 injection positions (
- Shared utilities:
- format:
escapeHtmlAttr/padNumber/getDateFormatParams(adds the{SSS}millisecond placeholder) - html:
injectBeforeTagWithFallback(with fallback strategy),injectHeadAndBody(two-region injection) - validation (new dedicated module):
validateGlobalName/validateNoScriptInTemplate/validateCallbackFields/validateNonNegativeNumber/validateNestedDuration/validateEnumValue
- format:
Enhanced
- Validator: added the
enum(allowedValues)/minValue(min)/maxValue(max)chained methods
[0.1.0] - 2026-05-24
Added the versionUpdateChecker plugin; renamed plugins (injectIco → faviconManager, injectLoading → loadingManager); added shared utility modules.
Added
versionUpdateCheckerplugin: periodically checks for version changes and prompts a refresh — typically used withgenerateVersion- Three version sources (
defineglobal /file(version.json) /autoauto-detect), three prompt UIs (modal/banner/toast) customPromptTemplatecustom templates (and other placeholders),customStyle,checkOnVisibilityChangeimmediate check on tab return, lifecycle callbacks (onUpdateAvailable/onRefresh/onDismiss)- XSS protection (no script tags), identifier safety (
defineNameprevents prototype pollution), SSR safety, destroy cleanup
- Three version sources (
- Shared utility modules: html (
injectBeforeTag/injectHtmlByPriority/HtmlInjectResult), script (makeCallback/containsScriptTag/validateIdentifierName)
Changed (breaking)
- Plugin renames:
injectIco→faviconManager,injectLoading→loadingManager(functionality unchanged, names now reflect responsibilities)
Enhanced
- faviconManager: added string shorthand (
faviconManager('/assets')); theurloption description now explicitly coversbase + favicon.ico - loadingManager: added runtime APIs
toggle(text?)/enablePointerEvents()/disablePointerEvents()/togglePointerEvents()/isPointerEventsEnabled()
[0.0.9] - 2026-05-23
Fixed critical injectLoading issues, added LoadingManager runtime APIs, and optimized the plugin framework.
Fixed
style.pointerEventsdefaulted tofalse, so the overlay couldn't block user interaction — now defaults totrue(enabled)- LoadingManager runtime API was incomplete — missing methods added
Added
- LoadingManager runtime APIs:
toggle(text?)/enablePointerEvents()/disablePointerEvents()/togglePointerEvents()/isPointerEventsEnabled() - Shared utilities:
readDirRecursive(returns entry info, avoids redundant stat calls),runWithConcurrency(bounded concurrent execution),shouldUpdateFile(incremental-copy check) - TypeScript type exports:
PluginFactory/OptionsNormalizer/DateFormatOptions
Enhanced
- injectIco: added string shorthand (
injectIco('/assets')) - BasePlugin: added
safeExecute/safeExecuteSync(error handling pererrorStrategy); the constructor now wrapsvalidateOptions(), so validation failures no longer crash builds - createPluginFactory: added the
OptionsNormalizersupport so plugins can accept non-object shorthand configs; factory generics gained anRparameter - buildProgress: non-TTY environments (CI/CD) degrade to log output; documented the progress stages (config → resolve → transform → bundle → write → done)
- generateRouter: documented
metaMappingdefaults ({ navigationBarTitleText: 'title', requireAuth: 'requireAuth' });nameStrategy: 'custom'requirescustomNameGenerator - generateVersion: documented the full
customFormatplaceholders
[0.0.8] - 2026-05-21
Added the injectLoading global loading-state plugin. This plugin has critical issues — upgrade to 0.0.9 as soon as possible.
Added
injectLoadingplugin: injects global loading-state management (runtime APIwindow.__LOADING_MANAGER__)- First-paint loading (
defaultVisible, visible as soon as HTML parses), auto-hide timing (DOMContentLoaded/load/manual) - Automatic request interception (
autoBind:fetch/xhr/all/none), request filtering (requestFilter) - Four built-in spinners (
spinner/dots/pulse/bar), transitions, minimum display time, delayed show, debounced hide, custom styles / templates, lifecycle callbacks, SSR safety, destroy cleanup
- First-paint loading (
[0.0.7] - 2026-05-19
Added the buildProgress build-progress-bar plugin.
Added
buildProgressplugin: renders a real-time build progress bar in the terminal- Three display formats (
bar/spinner/minimal), progress computed from the build lifecycle (config 5% → resolve 10% → transform 15%-85% → bundle +10% → write +5% → done 100%) - Custom width / fill characters / color theme, optional current module name (truncated when long), non-TTY log degradation,
destroy()stops the animation and restores the terminal cursor
- Three display formats (
[0.0.6] - 2026-05-18
Added plugin destroy lifecycle and sub-path type exports; optimized the logger system.
Added
- Destroy lifecycle: BasePlugin added the
destroy()virtual method (default: unregister log config);toPlugin()calls it at the end ofcloseBundle; generateRouter's file-watcher cleanup moved todestroy() - Logger: added the
Logger.unregister(pluginName)static method;Logger.destroy()clears all configs and resets the singleton - Sub-path type exports: factory (
PluginFactory/OptionsNormalizer/PluginWithInstance/BasePluginOptions), plugins (per-plugin options andRouteConfig/RouteMeta, etc.), common (CopyOptions/CopyResult/DateFormatOptions)
Enhanced
- injectIco: unified the icon interface name to
Icon(replacingIconConfig) - common/fs:
readFileSyncmarked deprecated (use the asyncreadFileContent);CopyOptionsgainedparallelLimit(default 10) andskipEmptyDirs
[0.0.5] - 2026-03-05
generateVersion supports auto-generating the version number during build, with multiple formats and output options.
Added
- generateRouter: generates a route config file from the uni-app project's
pages.json(pagesJsonPath/outputPath/outputFormat/nameStrategy/includeSubPackages/watch/metaMapping/preserveRouteChanges)
[0.0.4] - 2026-02-28
Added the generateVersion plugin and format utility exports; optimized file copy and object merge; improved the icon-injection plugin.
Added
- core package's common module exports format utilities
- the plugins module adds and exports the
generateVersionplugin
Enhanced
- Refactored the
readDirRecursiveinterface (returns file/directory entry info, reducing redundant stat calls) - Introduced concurrency limits for parallel file copy;
copySourceToTargetsupports parallel copy and incremental updates deepMergeskips undefined and refines nested-object merging- Logger gained log icons and colors for more readable console output
- injectIco now uses Vite's official
HtmlTagDescriptorinterface for icon tags, handles custom link tags, and itstransformIndexHtmlhook supports both string replacement and official tag injection
[0.0.3] - 2026-02-04
Upgraded the plugin factory, logger system, and generic validation.
Added
- Plugin factory added the
safeExecuteSyncsynchronous safe-execution function - Logger upgraded to a singleton framework: new
PluginLoggerinterface (per-plugin log proxy), unified output format (timestamp / namespace / icons / colors), log levels upgraded tosuccess/info/warn/error, with per-plugin log toggles managed via the config mapping - Validator genericized: compile-time type safety with a fluent API supporting chained type inference and type-safe custom validators / default-value methods
- BasePlugin genericized: integrated the generic Validator for type-safe option validation, with generic constraints
T/Kensuring field/default-type consistency - Updated architecture diagrams and API docs for the generic validation mechanism
[0.0.2] - 2026-01-26
Architecture upgrade (plugin factory), logger improvements, and option validation; copyFile and injectIco each gained two options.
Enhanced
- copyFile / injectIco new options:
incremental(copy only modified files, defaulttrue) anderrorStrategy('throw'/'log'/'ignore', default'throw')
[0.0.1] - 2026-01-21
First release, providing the copyFile and injectIco plugins.
Added
- copyFile plugin: copies files or directories to a target location after the Vite build (
sourceDir/targetDirrequired;overwrite/recursive/verbose/enabled) - injectIco plugin: injects favicon links into the HTML head during the Vite build (
base/url/link/icons/verbose/enabled/copyOptions)
