jalkoby / sass-webpack-plugin

[Deprecated] 🌈 Get your stylesheets together
MIT License
13 stars 6 forks source link

Support for embedded fonts & images as webpack assets #12

Closed peterjwest closed 6 years ago

peterjwest commented 6 years ago

There doesn't seem to be any support for fonts, images or other assets in a webpack build.

How do you get this to work as is? Currently webpack doesn't include any of my fonts/images because they aren't referenced in the JS.

I am investigating at how this is handled in css-loader and I'll see if I can produce a patch

peterjwest commented 6 years ago

Looks like they have a postcss plugin to traverse the CSS and extract all assets: https://github.com/webpack-contrib/css-loader/blob/c7884505e459e7d634bbe62330518cde98f9aed9/lib/processCss.js

jalkoby commented 6 years ago

this plugin is intended to work only with styles. all other assets should be handled separately. For example, I use https://github.com/webpack-contrib/copy-webpack-plugin

peterjwest commented 6 years ago

Thanks, it is a shame not to follow webpack principles with a dependency graph, though.