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

fix: support process each out dir when there are two or more #9748

Merged
merged 8 commits into from Sep 30, 2022

Conversation

qmhc
Copy link
Contributor

@qmhc qmhc commented Aug 19, 2022

Description

prepareOutDir only process the build.outDir, and the actions include empty dir and copy public dir for those defined in output.dir will be ignored.

Additional context

I notice that it will build output options twice if config.build.watch defined, so I promote the process to above.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@qmhc qmhc requested a review from patak-dev August 19, 2022 14:23
@qmhc qmhc requested a review from patak-dev August 20, 2022 16:30
@qmhc qmhc requested a review from patak-dev August 21, 2022 04:56
patak-dev
patak-dev previously approved these changes Aug 22, 2022
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes, this looks good to me now 👍🏼

@patak-dev patak-dev added the p3-minor-bug An edge case that only affects very specific usage (priority) label Aug 22, 2022
@qmhc
Copy link
Contributor Author

qmhc commented Aug 23, 2022

I found a problem about the split regexp, fixed it.

The original regexp will be incorrect when the skip paths includes more than two levels of nesting.

empty(dir, ['a/b/c', 'a/b/d'])

@qmhc qmhc requested a review from patak-dev August 23, 2022 01:06
patak-dev
patak-dev previously approved these changes Aug 25, 2022
packages/vite/src/node/build.ts Outdated Show resolved Hide resolved
packages/vite/src/node/build.ts Show resolved Hide resolved
@patak-dev
Copy link
Member

@qmhc we discussed this PR in today's team meeting and we think we can move forward with it. Before merging we should resolve the open discussions. We decided that the public files should be copied multiple times, to each output.dir.

@patak-dev patak-dev added this to the 3.2 milestone Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants