Repository navigation
Releases: buddywang/vite-plugin-dir2json
Releases · buddywang/vite-plugin-dir2json
Release list
v1.3.0
v1.2.5
- 当同一目录下存在同名但不同后缀的文件时,json数据key会添加后缀信息。
- when files with the same name and different suffixes exist in the same directory, the file key adds suffix information.
Full Changelog: v1.1.5...v1.2.5
v1.1.5
v1.1.4
fix bugs:
-
保证生成的dts文件结构稳定
-
sideEffectCode 用try catch包一下,防止报错卡死
-
更新正则:
- 注释的
?dir2json行不增加 sideEffectCode - 兼容识别不同格式的代码
- 注释的
-
更改生成的模块导入变量名规则,保证合法唯一
-
Ensure that the generated dts file structure is stable
-
Wrap sideEffectCode with try catch to prevent error reporting and stuck
-
Update regular rules:
- The commented
?dir2jsonline does not increase sideEffectCode - Compatible with identifying codes in different formats
- The commented
-
Change the generated module import variable name rules to ensure legal and unique
v1.1.0
- Convert the directory structure into json data containing specific file paths.
- By default, a static path is returned, and dynamic import can be returned by specifying a
lazyquery. - Support custom file format filtering through query or options,
extandextgquery will override the default supported ext list. - add test code
- refactor code
// zh - 将目录结构转换为包含指定后缀格式的文件路径的 JSON 数据
- 默认返回静态路径,支持通过
lazyquery 指定返回动态 import - 支持通过 query 或 options 自定义文件格式过滤,
ext和extgquery 会覆盖默认支持的 ext 列表 - 增加单元测试代码
- 重构代码