Closed xieyhn closed 1 year ago
For example, my-app is the project I'm developing and its path on disk is /xie/__demo__/my-app/, when I use vite-plugin-pages it won't match any path because the default exclude option has **/__*__/**.
my-app
/xie/__demo__/my-app/
vite-plugin-pages
exclude
**/__*__/**
vite.config.ts
import { defineConfig } from 'vite' import Vue from '@vitejs/plugin-vue' import Pages from 'vite-plugin-pages' export default defineConfig({ plugins: [ Vue(), Pages({ dirs: [ { dir: 'src/pages', baseRoute: 'pages' } ] }) ] })
So I think the exclude option here should be relative to my dir option, this PR resolve the problem.
dir
fixes #123
fixed https://github.com/hannoeru/vite-plugin-pages/commit/ef31440d4222672456ca83e6d59f07c4b58d06e1
Description
For example,
my-app
is the project I'm developing and its path on disk is/xie/__demo__/my-app/
, when I usevite-plugin-pages
it won't match any path because the defaultexclude
option has**/__*__/**
.vite.config.ts
So I think the
exclude
option here should be relative to mydir
option, this PR resolve the problem.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).