Skip to content

Releases: buddywang/vite-plugin-dir2json

v1.3.0

Choose a tag to compare

@buddywang buddywang released this 11 Oct 13:21

1.支持 hmr,当目录文件变更时,自动更新 dts 文件、自动更新虚拟模块

  1. Support hmr, automatically update dts files and virtual modules when directory files change.

v1.2.5

Choose a tag to compare

@buddywang buddywang released this 22 Sep 04:15
  • 当同一目录下存在同名但不同后缀的文件时,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

Choose a tag to compare

@buddywang buddywang released this 30 Jul 05:25

feature:

  • 生成的声明文件增加详细的import()导入路径信息,方便文件跳转

  • The generated declaration file adds detailed import() import path information to facilitate file jumps.

v1.1.4

Choose a tag to compare

@buddywang buddywang released this 30 Jul 02:59

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 ?dir2json line does not increase sideEffectCode
    • Compatible with identifying codes in different formats
  • Change the generated module import variable name rules to ensure legal and unique

v1.1.0

Choose a tag to compare

@buddywang buddywang released this 17 Jul 07:47
  • 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 lazy query.
  • Support custom file format filtering through query or options, ext and extgquery will override the default supported ext list.
  • add test code
  • refactor code
    // zh
  • 将目录结构转换为包含指定后缀格式的文件路径的 JSON 数据
  • 默认返回静态路径,支持通过 lazy query 指定返回动态 import
  • 支持通过 query 或 options 自定义文件格式过滤,ext和extg query 会覆盖默认支持的 ext 列表
  • 增加单元测试代码
  • 重构代码

v1.0.5

Choose a tag to compare

@buddywang buddywang released this 15 May 03:53
  • Convert the directory structure into json data containing supported file paths
  • Typescript support
  • Perfect code