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: adding the unenv package and removing the polyfill manager #425

Merged
merged 14 commits into from
Feb 4, 2025

Conversation

jcbsfilho
Copy link
Collaborator

This pull request includes several changes that aim to update and refactor the ESBuild and Webpack bundlers and their plugins. The main changes involve replacing PolyfillsManager with the unenv package, updating polyfill paths, and removing unused polyfill files.

Refactoring and Updates:

  • Polyfills Replacement:

    • Changes to ESbuild and Webpack Node Modules plugins for use with unenv.
    • Replaced PolyfillsManager with azionLibs in ESBuildAzionModulePlugin and updated references accordingly in azion-polyfills.plugins.js.
    • Replaced PolyfillsManager with azionLibs in WebpackAzionPolyfillPlugin and updated references accordingly in azion-polyfills.plugins.js.
    • Added azion-libs.js to define external polyfills paths and mappings.
  • Configuration Adjustments:

    • Modified mainFields order in esbuild.config.js to prioritize 'module' over 'main'.
    • Updated test expectations to reflect new polyfill paths and names.
  • Removal of Unused Polyfills:

    • Removed various polyfill files including crypto.js, dns.js, process.cjs, and others that are no longer needed.
  • Helper and Utility Updates:

    • Added unenv-preset.js to define aliases and external modules for the ESBuild and Webpack environment.

These changes streamline the ESBuild and Webpack configuration, improve module resolution, and remove redundant code, enhancing maintainability and performance.

@jcbsfilho jcbsfilho marked this pull request as ready for review February 3, 2025 13:21
@jcbsfilho jcbsfilho merged commit 529c267 into stage Feb 4, 2025
1 check passed
@jcbsfilho jcbsfilho deleted the feat/add-unenv branch February 4, 2025 15:42
gabrielnes-azion pushed a commit that referenced this pull request Feb 4, 2025
[skip ci]
## [4.6.0-stage.1](v4.5.0...v4.6.0-stage.1) (2025-02-04)

### Features

* adding the unenv package and removing the polyfill manager ([#425](#425)) ([529c267](529c267))
@gabrielnes-azion
Copy link
Contributor

🎉 This PR is included in version 4.6.0-stage.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

gabrielnes-azion pushed a commit that referenced this pull request Feb 6, 2025
[skip ci]
## [4.6.0](v4.5.0...v4.6.0) (2025-02-06)

### Features

* adding the unenv package and removing the polyfill manager ([#425](#425)) ([529c267](529c267))
@gabrielnes-azion
Copy link
Contributor

🎉 This PR is included in version 4.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants