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(pluginContainer): run transform in this.load #14965

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Nov 13, 2023

Description

Rollup docs: https://rollupjs.org/plugin-development/#this-load

Follow-up from #11469

  • Further, this.load is supposed to trigger transform and moduleParsed - this does not (in accordance with vite's on-demand nature)

I think it still make sense to run the transform part. Vite's on-demand nature shouldn't affect plugin container's compatibility with Rollup as long as it makes sense in dev. We do transform in dev, but we don't do moduleParsed, but we should have the code to also support that if we want.

Additional context

I spotted this while working with the Remix folks. It doesn't blocked them or me now, so this would be a nice to have.


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, especially the Pull Request Guidelines.
  • 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).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Nov 13, 2023
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should merge this one for Vite 5

@bluwy bluwy merged commit 3f57b05 into main Nov 13, 2023
10 checks passed
@bluwy bluwy deleted the pluginContainer-load-transform branch November 13, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants