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(legacy)!: should rename x.[hash].js to x-legacy.[hash].js #11599

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

aleen42
Copy link
Contributor

@aleen42 aleen42 commented Jan 5, 2023

Description

The previous regex has renamed x.[hash].js to x.[hash]-legacy.js.

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.

@patak-dev
Copy link
Member

Would you create a test that reproduces this issue?

@bluwy bluwy added plugin: legacy p2-nice-to-have Not breaking anything but nice to have (priority) breaking change labels Jan 6, 2023
@aleen42
Copy link
Contributor Author

aleen42 commented Jan 6, 2023

@patak-dev I have changed the implementation, which will be smarter when meeting [hash].

@sapphi-red sapphi-red linked an issue Jan 6, 2023 that may be closed by this pull request
7 tasks
@bluwy bluwy changed the title fix: should rename x.[hash].js to x-legacy.[hash].js fix(legacy)!: should rename x.[hash].js to x-legacy.[hash].js Oct 6, 2023
bluwy
bluwy previously approved these changes Oct 6, 2023
@patak-dev patak-dev merged commit e7d7a6f into vitejs:main Oct 6, 2023
10 checks passed
@sapphi-red sapphi-red mentioned this pull request Oct 6, 2023
13 tasks
@jiadesen
Copy link
Contributor

jiadesen commented Nov 22, 2023

@aleen42 @patak-dev
Although this is a trivial problem, the new rule here will produce the following weird file names:

[hash].js -> -legacy[hash].js

eg:

image -> image

v4:
image

@patak-dev
Copy link
Member

I think it would be good to fix this, @jiadesen would you open a proper issue (and later a PR if you'd like) for this? Maybe we should revert to v4 if there is no [name] in the pattern

@jiadesen
Copy link
Contributor

ok, I can try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change p2-nice-to-have Not breaking anything but nice to have (priority) plugin: legacy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@vitejs/plugin-legacy chunk name is't working with config?
4 participants