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(reporter): build.assetsDir should not impact output when in lib mode #12108

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

sun0day
Copy link
Member

@sun0day sun0day commented Feb 19, 2023

Description

  • entry name has nothing to do with config.build.assetsDir in lib mode, so assetsDir shouldn’t affect the final output color
  • with trailing ‘/‘ (e.g assets/), assetsDir's color won’t be dim in the reporter output

The simple way to show the entry file path would be:

color.dim(entry dirname) + group.color(entry basename)

Additional context


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 PR Title 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.

@sun0day
Copy link
Member Author

sun0day commented Feb 22, 2023

@bluwy cc

Copy link
Member

@ArnaudBarre ArnaudBarre left a comment

Choose a reason for hiding this comment

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

The goal was to only dim "redundant" parts so that if there is dirs inside public they are not dim. But I'm fine with this version too

@sun0day
Copy link
Member Author

sun0day commented Mar 2, 2023

Are you fine with this pr? @patak-dev

@patak-dev
Copy link
Member

I think that @ArnaudBarre idea could lead to a better DX here. @sun0day maybe you could try to fix the issue in a way that respects what Arnaud was trying to achieve?

@sun0day sun0day changed the title fix(reporter): output entry file path: entry dirname + entry basename fix(reporter): build.assetsDir should not impact output when in lib mode Mar 3, 2023
@sun0day
Copy link
Member Author

sun0day commented Mar 3, 2023

I think that @ArnaudBarre idea could lead to a better DX here. @sun0day maybe you could try to fix the issue in a way that respects what Arnaud was trying to achieve?

Ok. I reserved ArnaudBarre idea and fix the two small issues.

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Mar 12, 2023
@patak-dev patak-dev merged commit b12f457 into vitejs:main Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants