vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
12.29k stars 2k forks source link

Should add more config about `glob` to data loading , such as `dot: true` #3599

Open bjwktcsnzh opened 5 months ago

bjwktcsnzh commented 5 months ago

Describe the bug

(Not entirely a bug , but it's annoying)

I need to add property into glob option param ... just like dot: true

https://github.com/vuejs/vitepress/blob/28989df83446923a9e7c8ada345b0778119ed66f/src/node/plugins/staticDataPlugin.ts#L102

if dot: true not exist , the watchFile list will not include the file which both on project root and start with dot , such as .gitignore.gitlab-ci ....

Reproduction

(Not entirely a bug)

Expected behavior

i can add glob option param

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
    Memory: 2.70 GB / 15.88 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE     
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD     
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.9.2 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Chrome: 121.0.6167.185
    Edge: Chromium (121.0.2277.128)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    vitepress: ^1.0.0-rc.31 => 1.0.0-rc.33

Additional context

The dot param description in fast-glob :

    /**
     * Allow patterns to match entries that begin with a period (`.`).
     *
     * @default false
     */
    dot?: boolean;

Validations

bjwktcsnzh commented 5 months ago

This is an annoying parameter of fast-glob 💢

bjwktcsnzh commented 5 months ago

Of course, this is not a big worry. Because I can bypass this bug without using watch mode.