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

Include data URI assets in manifest #304

Open
arasmussen opened this issue Nov 25, 2024 · 0 comments
Open

Include data URI assets in manifest #304

arasmussen opened this issue Nov 25, 2024 · 0 comments

Comments

@arasmussen
Copy link

  • Manifest Plugin Version: 5.0.0

Feature Use Case

I might be misunderstanding the purpose of this tool... I'm trying to replace webpack-isomorphic-tools and essentially need a new webpack-assets.json. webpack-assets.json was a mapping from asset import paths to asset URLs (regular URLs or base64 URLs).

I'm thinking webpack-manifest-plugin might be the right solution here, but it currently only includes emitted files in its mapping (e.g. from file-loader or type: 'asset/resource'), but not base64 assets (e.g. from url-loader or type: 'asset/inline').

Feature Proposal

In addition to including an asset mapping for emitted files:

{
  "sdk.js": "https://example.com/sdk.js"
}

... also include asset mapping for non-emitted files:

{
  "sdk.js": "https://example.com/sdk.js"
  "img.png": "data:image/svg+xml;base64,PHN2ZyB4bWx...",
}

If you're worried about this impacting existing setups, I think it'd be pretty easy to put it behind a default false flag like includeNonEmittedFiles or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant