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

How to import image generated by image-webpack-loader #130

Closed
srghma opened this issue Aug 7, 2019 · 5 comments
Closed

How to import image generated by image-webpack-loader #130

srghma opened this issue Aug 7, 2019 · 5 comments

Comments

@srghma
Copy link

srghma commented Aug 7, 2019

When using js with
https://www.npmjs.com/package/image-webpack-loader one can write

import image from "./image.png"

console.log(image) # will output base64 encoded string OR relative path to image from dist directory

But how to import image from purescript code? FFI?

@ethul
Copy link
Owner

ethul commented Aug 7, 2019 via email

@srghma
Copy link
Author

srghma commented Aug 7, 2019

@ethul I have no idea how to make it possible, do you have one?

@ethul
Copy link
Owner

ethul commented Aug 7, 2019

I've looked into this previously and did not come up with a good way to do this. I am open to ideas on how to make this possible.

@srghma
Copy link
Author

srghma commented Aug 10, 2019

actually image import is working without changes

ethul/purescript-webpack-example#10

@srghma srghma closed this as completed Aug 10, 2019
@ethul
Copy link
Owner

ethul commented Aug 10, 2019

Great! Thanks for testing this out.

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