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
Collaborator

@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.
@patak-js
Copy link
Member

@patak-js patak-js commented Jul 3, 2021

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

@Shinigami92 Shinigami92 requested review from patak-js and Shinigami92 Jul 9, 2021
@patak-js
Copy link
Member

@patak-js patak-js commented Jul 11, 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.

@ygj6
Copy link
Collaborator Author

@ygj6 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-js
Copy link
Member

@patak-js patak-js commented Jul 12, 2021

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

@patak-js patak-js marked this pull request as draft Jul 14, 2021
@ygj6 ygj6 force-pushed the ygj6:issue-3133 branch from 3deee5d to 82618a0 Jul 19, 2021
@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 Jul 19, 2021
@ygj6
Copy link
Collaborator Author

@ygj6 ygj6 commented Jul 19, 2021

The code is updated, please review, thank you.

@patak-js patak-js merged commit decc7d8 into vitejs:main Jul 19, 2021
6 checks passed
6 checks passed
@github-actions
Build&Test: node-12, ubuntu-latest
Details
@github-actions
Build&Test: node-14, ubuntu-latest
Details
@github-actions
Build&Test: node-16, ubuntu-latest
Details
@github-actions
Build&Test: node-14, macos-latest
Details
@github-actions
Build&Test: node-14, windows-latest
Details
@github-actions
Lint: node-14, ubuntu-latest
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants