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: avoid import duplicate chunks #2906 #2940

Merged
merged 1 commit into from
Apr 14, 2021
Merged

Conversation

psaren
Copy link
Contributor

@psaren psaren commented Apr 10, 2021

Description

Fix #2906 Maximum call stack size exceeded because import duplicate chunks.

Additional context

I have build vite in my local npm through verdaccio,
and install it to in Reproduction repo https://github.com/g4rcez/vite-testing;
I run yarn build successfully.


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.

@Shinigami92 Shinigami92 marked this pull request as draft April 10, 2021 16:26
@Shinigami92
Copy link
Member

Cause tests are failing here, I converted this PR to a draft

@psaren
Copy link
Contributor Author

psaren commented Apr 10, 2021

@Shinigami92
I check out the latest main branch of vite repo & yarn test-build, it also shown the same test fail message.

@Shinigami92
Copy link
Member

But something needs to be wrong on your side
cause the last commit to main branch is green and other issues already based on the newest main are also green (e.g. #2939)

@g4rcez
Copy link

g4rcez commented Apr 11, 2021

Awesome @psaren. Thanks for fixing #2906

@psaren
Copy link
Contributor Author

psaren commented Apr 12, 2021

@g4rcez some tests failed, i try to fix it, but it hasn't been fixed yet

@psaren
Copy link
Contributor Author

psaren commented Apr 12, 2021

@g4rcez
in your viteconfig.js, Maximum call stack size exceeded because import duplicate chunks.
I find the mthod getCssTagsForChunk in plugin [vite:html] is recursive call, so we need to filter the same chunk to avoid Infinite call.
so i add the code in fbba7b2.
but some tests failed.

@psaren psaren force-pushed the main branch 2 times, most recently from df9c810 to e6eba9d Compare April 13, 2021 14:30
@psaren psaren marked this pull request as ready for review April 13, 2021 15:03
@psaren
Copy link
Contributor Author

psaren commented Apr 13, 2021

@Shinigami92 Hello, I have solved the problem that the some test case failed.

@psaren psaren force-pushed the main branch 2 times, most recently from 8cb1c0d to 83908ef Compare April 14, 2021 00:27
@patak-dev patak-dev merged commit 8b02abf into vitejs:main Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximum call stack size exceeded on use manualChunks
4 participants