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

feat: log a warning if dependency pre-bundling cannot be run #4546

Merged
merged 1 commit into from Aug 9, 2021

Conversation

benmccann
Copy link
Collaborator

@benmccann benmccann commented Aug 9, 2021

Description

Log a warning if dependency pre-bundling cannot be run

Additional context

It turns out that SvelteKit was entirely skipping dependency pre-bundling. I think this has been part of the reason that we've gotten so many reports from people not being able to use CJS dependencies. There's still multiple other issues preventing CJS from working in Vite, but we've at least fixed the SvelteKit portion of it now. It would have been very nice to realize this earlier, but took a fair amount of debugging to figure out. Hopefully this will save other people from hitting the same issue


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.

@antfu antfu merged commit 120f3b9 into vitejs:main Aug 9, 2021
@yyx990803
Copy link
Member

This warning is technically wrong because it logs even when

  1. the user explicitly sets the entry to an empty array
  2. When there is no resolved entrypoints, but the user has explicit optimizeDeps.include.

Fixed in b586098

aleclarson pushed a commit to aleclarson/vite that referenced this pull request Nov 8, 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.

None yet

4 participants