Skip to content

[Feature]: The ability to get the integrity field from the manifest #6090

@sowtame

Description

@sowtame

What problem does this feature solve?

when you create an application using a custom rsbuild API, without using the html plugin, you can only get integriry using a self-written plugin, which creates integriry itself in the last stage.

What does the proposed API look like?

it would be great to have a separate integrity flag so that you can get a hash value in the manifest.
like here:
https://rsbuild.rs/config/output/manifest#outputmanifest

manifest: {
      filename: './static/my-manifest.json',
      sri: true
},

and it will generate

"initial": {
                "js": [
                    {
                        "src": "/assets/static/js/test.0721d9d4.js",
                        "integriy": "sha256-....."
                    }
                ]
            },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions