Skip to content

[Feature]: AssetGeneratorDataUrlFunction should align with webpack #8538

@GiveMe-A-Name

Description

@GiveMe-A-Name

What problem does this feature solve?

In Rspack, module.generator.dataUrl function mode signature is ({ content: string, filename: string }) => string, it is not align with webpack.
In webpack, module.generator.dataUrl function mode signature like bellow code:

export type AssetGeneratorDataUrlFunction = (
	source: string | Buffer,
	context: {filename: string; module: Module
) => string;

What does the proposed API of configuration look like?

  • export Module API
  • function signature is align with webpack

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions