vite icon indicating copy to clipboard operation
vite copied to clipboard

feat(legacy): support iife output and merge polyfills with code

Open marco-prontera opened this issue 3 years ago • 4 comments

Description

fixes #7026 The goal of this PR is to enhance the legacy of the plugin by adding two parameters to allow users of this plugin to choose between SystemJS or IIFE to generate the legacy version of the bundled code and a parameter to merge the polyfills to the application code.

Additional context

Closes #7026


What is the purpose of this pull request?

  • [ ] Bug fix
  • [X] New Feature
  • [X] Documentation update
  • [ ] Other

Before submitting the PR, please make sure you do the following

  • [X] Read the Contributing Guidelines.
  • [X] Read the Pull Request Guidelines and follow the Commit Convention.
  • [X] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [X] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [X] Ideally, include relevant tests that fail without this PR but pass with it.

marco-prontera avatar Feb 21 '22 21:02 marco-prontera

Hi @aleclarson, I wanted to ask you if it was possible to verify this PR, please. I think it is important to minimize dependencies and using SystemJS worries me a little as I don't have the control I need, moreover in some cases the use of SystemJS only adds an overload. I also think that the balance between cross-browser support and the amount of code could benefit from this because precisely with a configuration we could remove this overload from the output (if not necessary). At the moment I am forced to use a version locally with these changes proposed in this PR.

Hope for a review soon, sorry for the disturb, and thanks in advance 😉

marco-prontera avatar Apr 16 '22 16:04 marco-prontera

Hi @Marco-Prontera, just wanted to let you know that we've put this PR in the team discussion board. We'll try to get to it soon. Sorry for the long wait!

bluwy avatar May 23 '22 04:05 bluwy

Hi @bluwy any news? 😃

marco-prontera avatar Jun 29 '22 09:06 marco-prontera

Sorry we've been busy with the Vite 3 release. Hoping we can finally take a look at this in the next team meeting 😬

bluwy avatar Jul 14 '22 09:07 bluwy

This was discussed in the last meeting. However we decided to not go ahead with this as we prefer to maintain the systemjs only version instead. If you'd like to use this feature, you can fork the plugin and publish it separately. Closing this for now.

bluwy avatar Feb 26 '23 13:02 bluwy

This was discussed in the last meeting. However we decided to not go ahead with this as we prefer to maintain the systemjs only version instead. If you'd like to use this feature, you can fork the plugin and publish it separately. Closing this for now.

I understand, thanks

marco-prontera avatar Feb 27 '23 07:02 marco-prontera