Releases: sdinteractive/webpack-requirejs-export-plugin
v4.0.1
Release Notes - v4.0.1
Fix webpack 5 compatibility for RequireJsExportPlugin
This release fixes module export registration when using webpack 5.
Background
The original webpack 4 implementation relied on modifying module source to register exports for RequireJS consumption. During the webpack 5 migration, module export capture no longer worked reliably, causing RequireJS modules to fail to resolve correctly.
Changes
Added webpack 5 support using JavascriptModulesPlugin.renderModuleContent.
Restored per-module export registration by injecting export capture directly into module content.
Added safeguards for modules that do not expose webpack_exports.
Preserved existing webpack 4 behavior and backward compatibility.
Removed reliance on runtime module capture that could trigger cross-chunk dependency resolution issues.
Fixed Issues
Failed RequireJS module exports under webpack 5.
Errors related to unresolved shared dependencies during export capture.
Missing exports for modules loaded from shared/common chunks.
Compatibility issues with ES modules and default exports.
Validation
Verified successful RequireJS loading and export resolution for application modules across Adobe Commerce 2.4.8 storefront pages, including modules loaded from shared chunks.
Upgrade Notes
No configuration changes are required. Consumers upgrading to this version will automatically receive the webpack 5 compatibility fix while retaining webpack 4 support.
Full Changelog: v4.0.0...v4.0.1
v4.0.0
What's Changed
- Upgrade to webpack 5 by @nmintcheva in #8
New Contributors
- @nmintcheva made their first contribution in #8
Full Changelog: v3.0.0...v4.0.0