Skip to content

feat: allow to access manifest data in plugin hooks#5140

Merged
chenjiahan merged 1 commit intomainfrom
manifest_data_0430
Apr 30, 2025
Merged

feat: allow to access manifest data in plugin hooks#5140
chenjiahan merged 1 commit intomainfrom
manifest_data_0430

Conversation

@chenjiahan
Copy link
Member

Summary

Add a new manifest property to the environment context object to allow plugin hooks to access manifest data.

Only available when:

  • The output.manifest config option is enabled
  • The build process has completed, accessible in hooks like onAfterBuild, onDevCompileDone and onAfterEnvironmentCompile
const plugin = {
  name: 'test',
  setup(api: RsbuildPluginAPI) {
    api.onAfterBuild(({ environments }) => {
      console.log(environments.web.manifest);
      console.log(environments.node.manifest);
    });
  },
}

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Apr 30, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 0971596
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/681221020d76540008bc3223
😎 Deploy Preview https://deploy-preview-5140--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 53 (🔴 down 31 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@chenjiahan chenjiahan merged commit 3b55d49 into main Apr 30, 2025
12 checks passed
@chenjiahan chenjiahan deleted the manifest_data_0430 branch April 30, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant