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

Get url of an arbitrary image not included in stylesheet/javascript #8

Closed
simplenotezy opened this issue Dec 28, 2019 · 2 comments
Closed

Comments

@simplenotezy
Copy link

I have found this issue related to getting a image URL from the manifest: #4

However, this does not work since my image is only used in the HTML (for an Admin Menu Icon), so it is not included in the manifest. Is there a way to force it to be included in the manifest?

@swashata
Copy link
Owner

As said here swashata/wp-webpack-script#807 (comment) I would recommend not to reference the image at all, which isn't a part of your javascript application. For images needed from server side, like this, just use the image from what-ever location you find convenient.

@swashata
Copy link
Owner

Also, I would like to focus on the fact, that this tooling is a module bundler (webpack) optimized for specific WordPress use case. Now module bundler is primarily for JavaScript apps, that run on the front-end (at-least in case of WordPress, because the server is PHP).

So the tooling shouldn't be concerned with static assets which are not dependencies of your JavaScript entrypoint (or the app).

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

2 participants