Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude not work when file change #391

Open
5 tasks done
liuyang0826 opened this issue Mar 28, 2023 · 2 comments
Open
5 tasks done

exclude not work when file change #391

liuyang0826 opened this issue Mar 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@liuyang0826
Copy link

Describe the bug

https://github.com/hannoeru/vite-plugin-pages/blob/main/src/utils.ts#L38 isTarget not validate exclude options

Reproduction

https://github.com/hannoeru/vite-plugin-pages/blob/main/src/utils.ts#L38

System Info

System:
  OS: Windows 10 10.0.22621
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
  Memory: 4.61 GB / 15.74 GB
Binaries:
  Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
  npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
  Edge: Spartan (44.22621.1413.0), Chromium (111.0.1661.44)
  Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Validations

  • Follow the Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A please open a GitHub Discussion.
  • The provided reproduction is a minimal reproducible example of the bug.
@liuyang0826 liuyang0826 reopened this Mar 28, 2023
@hannoeru hannoeru added the bug Something isn't working label Apr 1, 2023
@xianghongai
Copy link

export default defineConfig(({ mode }) => {
  return {

    plugins: [

      // https://www.npmjs.com/package/vite-plugin-pages
      Pages({
        dirs: 'src/views',
        exclude: ['**/{_components_,_services_,_configs_,constants_,_utils_,_styles_}/**'],
      }),

    ],
  };
});

When I create a new directory that matches the exclude rule, the corresponding route will be generated, which is not as expected.

{
    "name": "news-_configs_",
    "path": "/news/_configs_",
    "props": true
}

@whxmm0608
Copy link

It's happend to me too.any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants