Skip to content

Module Mapper#667

Open
yofukashino wants to merge 6 commits intoreplugged-org:mainfrom
yofukashino:unmangleExports
Open

Module Mapper#667
yofukashino wants to merge 6 commits intoreplugged-org:mainfrom
yofukashino:unmangleExports

Conversation

@yofukashino
Copy link
Contributor

@yofukashino yofukashino commented Feb 10, 2025

https://discord.com/channels/1000926524452647132/1000955965304221728/1338570883844800532

  • Added webpack.mapModule to get an object that is easy to reassign to and work with
  • Added webpack.getExportsKeyForProps to be used with webpack.mapModule
  • iterateModuleExports is changed to yield both the key and value for this

Example:

const MediaModel = await webpack
  .waitForModule(
    webpack.filters.bySource(/hasMediaOptions:!\w+\.shouldHideMediaOptions/),
  )
  .then((LazyMediaModel) =>
    webpack.mapModule(LazyMediaModel, {
      viewMedia: webpack.getFunctionKeyBySource(
        LazyMediaModel,
        ".MEDIA_VIEWER",
      ),
    }),
  );

@fedeericodl fedeericodl added enhancement New feature or request semver: minor Requires a minor semver version bump labels Feb 13, 2025
@netlify
Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for replugged-docs failed.

Name Link
🔨 Latest commit ea7dad0
🔍 Latest deploy log https://app.netlify.com/projects/replugged-docs/deploys/68d3f68ed01b600008639e4e

@yofukashino yofukashino changed the title Unmangle Exports Module Mapper Sep 24, 2025
@fedeericodl fedeericodl added the addon development Relates to developing addons, eg APIs or scripts label Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addon development Relates to developing addons, eg APIs or scripts enhancement New feature or request semver: minor Requires a minor semver version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants