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

Output to Webpack's internal asset array #56

Open
Jazcash opened this issue Mar 8, 2018 · 1 comment
Open

Output to Webpack's internal asset array #56

Jazcash opened this issue Mar 8, 2018 · 1 comment

Comments

@Jazcash
Copy link

Jazcash commented Mar 8, 2018

Is it possible to keep the output files generated by this plugin in webpack's pipe, rather than writing to disk, making it easy to do other things with the spritesheets after they've been generated?

Klathmon/imagemin-webpack-plugin#37 (comment)

@mixtur
Copy link
Owner

mixtur commented Mar 8, 2018

Initially files generated by plugin were meant to be used as sources, not as final assets. With that in mind your original issue could be solved by using file-loader as in example in readme. Then file-loader would pick generated images and put them into webpack's assets, allowing other plugins to work on them.

When plugin used that way it don't make any sense to add generated images to webpack's assets.
Yet when generated image IS used as final asset it indeed makes sense, also it would probably work slightly faster with webpack-dev-server.

Plugin would have to deside between these two behaviours. Via some flag in config, I guess.

So yes. It is possible, but I am not sure if it is necessary.

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