Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Module.parser.asset.dataUrlCondition support function #8488

Open
Tracked by #8445
GiveMe-A-Name opened this issue Nov 20, 2024 · 2 comments
Open
Tracked by #8445
Labels
feat New feature or request team The issue/pr is created by the member of Rspack.

Comments

@GiveMe-A-Name
Copy link
Member

What problem does this feature solve?

Currently, Rspack config.module.parser.asset.dataUrlCondition only support object.
We can't compute the dataUrlCondition.maxSize by function.

What does the proposed API of configuration look like?

Align webpack, Module.parser.asset.dataUrlCondition support function.

module.exports = {
  module: {
    parser: {
      asset: {
        dataUrlCondition: (source, { filename, module }) => {
          return condition(source)
        }
      },
    },
  },
};
@GiveMe-A-Name GiveMe-A-Name added feat New feature or request pending triage The issue/PR is currently untouched. labels Nov 20, 2024
@inottn
Copy link
Collaborator

inottn commented Nov 20, 2024

If no one else is working on it, I can give it a try.

@GiveMe-A-Name
Copy link
Member Author

If no one else is working on it, I can give it a try.

Yes, you can. Thanks your contribution firstly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

4 participants