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: library mode does not include preload #4097

Merged
merged 2 commits into from Jul 19, 2021
Merged

Conversation

ygj6
Copy link
Member

@ygj6 ygj6 commented Jul 3, 2021

Description

Related issues #3133 #3662
Add build.autoPreload switch configuration. When set to false, __vitePreload helper method will not be inserted.
Support library mode does not include preload

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 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 added enhancement New feature or request p2-nice-to-have Not breaking anything but nice to have (priority) labels Jul 3, 2021
@patak-dev
Copy link
Member

I think this makes sense. We'll review this with the team next week to get approval for the new feature.

Shinigami92
Shinigami92 previously approved these changes Jul 9, 2021
@patak-dev
Copy link
Member

@ygj6 we discussed this with the team and we think it is better to avoid adding a new option here. We should directly disable the preload scheme in library mode, that would fix the issue that has a definite use case. You could reuse this PR or start a new one.

@ygj6
Copy link
Member Author

ygj6 commented Jul 12, 2021

@ygj6 we discussed this with the team and we think it is better to avoid adding a new option here. We should directly disable the preload scheme in library mode, that would fix the issue that has a definite use case. You could reuse this PR or start a new one.

okay, I will submit a PR as soon as possible.

@patak-dev
Copy link
Member

Thanks for all the work you are doing for vite @ygj6 ❤️

@patak-dev patak-dev marked this pull request as draft July 14, 2021 12:27
@ygj6 ygj6 changed the title Add preload directives config feat: library mode does not include preload Jul 19, 2021
@ygj6 ygj6 marked this pull request as ready for review July 19, 2021 13:12
@ygj6
Copy link
Member Author

ygj6 commented Jul 19, 2021

The code is updated, please review, thank you.

@patak-dev patak-dev merged commit decc7d8 into vitejs:main Jul 19, 2021
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
enhancement New feature or request 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.

None yet

3 participants